Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/how/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Requirements:

- [#20842](https://github.com/datahub-project/datahub/pull/20842) **(Ingestion / Power BI)** Column-level lineage now follows the same `dataset_type_mapping` filter as table-level lineage, in both `metadata_api_mode` settings. If you narrowed `dataset_type_mapping` to fewer platforms than the default, a Power BI column no longer gets a lineage edge to a column of an upstream table that the mapping excludes; before, the column edge was emitted even though the table edge was not. Duplicate column-level edges, which were emitted once per upstream table of a Power BI table, are also removed. **Action:** none unless you relied on column lineage to platforms you left out of `dataset_type_mapping`; add those platforms to the mapping to keep it. The dropped edges disappear on the next run.
- [#20876](https://github.com/datahub-project/datahub/pull/20876) **(Ingestion / Power BI)** Column-level lineage no longer links a warehouse column to a Power BI _calculated column_ (a column defined by a DAX expression) of the same name, in both `admin_scan` and `workspace_apis` modes; such columns are computed inside the semantic model and the previous edge pointed at a column the warehouse never feeds. For semantic models read through `metadata_api_mode: workspace_apis`, column lineage now follows each column's TMDL `sourceColumn`, so a field renamed in the model points at its real upstream column instead of a same-named one. **Action:** none unless you relied on those edges; the dropped edges disappear on the next run with stateful ingestion.
- [#20884](https://github.com/datahub-project/datahub/pull/20884) **(Ingestion / Power BI)** A semantic-model table (or Dataflow Gen2 entity) that reads a Microsoft Fabric Lakehouse or Warehouse through its SQL analytics endpoint (an M query calling `Sql.Database("<endpoint>.datawarehouse.fabric.microsoft.com", ...)`) now gets its upstream lineage edge on the OneLake table (`fabric-onelake` platform, the URN the OneLake connector emits) instead of a generic SQL Server (`mssql`) dataset. This applies in both `metadata_api_mode` settings, because the admin scan also lists the workspace's Lakehouses and Warehouses. The edge is rewritten in place on the next run; no entity is deleted, but the old `mssql` dataset the edge pointed at no longer receives lineage from Power BI. Endpoints that cannot be matched to a Lakehouse or Warehouse of the same workspace keep their `mssql` edge and are reported as warnings. The OneLake edge is kept even if you narrowed `dataset_type_mapping` to leave out SQL Server, the same as DirectLake lineage, so a table that had no upstream edge under such a mapping now gets one. **Action:** none, unless something relied on the `mssql` upstream of such tables; in that case map the workspace id in `server_to_platform_instance` and ingest the Fabric items with the OneLake connector so the new edge lands on an existing dataset.

- [#21219](https://github.com/datahub-project/datahub/pull/21219) **(Ingestion / Qlik Sense)** On Qlik Sense Enterprise, QVD datasets are now placed in `Folder` containers that follow their file path (server or share, then each folder), and are browsed under those folders instead of the path split at its dots. Their URNs, schemas and lineage are unchanged. **Action:** update any bookmark or saved browse path that pointed at the old QVD hierarchy.

Expand Down
2 changes: 2 additions & 0 deletions metadata-ingestion/docs/sources/powerbi/powerbi_pre.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ No Microsoft Entra application permissions need to change: both API families are

What `workspace_apis` mode ingests: workspaces, dashboards, tiles, reports, report pages, datasets with tables, columns, measures and their descriptions, M expressions, table and column lineage (including DirectLake lineage to Fabric Lakehouses and Warehouses), paginated-report dataset bindings, and owners derived from workspace roles. With `extract_report_field_usage` enabled, a Power BI report (not a paginated report, which never gets field usage or filters) whose definition is fetched and parsed gets, on each page chart, the model fields its visuals read, and its report-level and page-level filters as `filters` / `filterCount` properties on the report and its pages, with the filtered fields added to the page's `inputFields`; a report whose definition is refused or cannot be parsed gets neither its filters nor their fields. `filters` holds at most 50 entries: `filterCount` is the full count and `filtersTruncated: true` marks a shortened list. A rendered condition is cut to 500 characters and lists at most 20 `In` values, and a condition shape the connector does not recognize is kept as its raw JSON cut to 200 characters, so `filters` is a summary, not the complete filter definition. A filter's rendered condition includes the literal values it compares against (for example the selected categories or thresholds), so treat these properties as potentially containing business data.

**Fabric Lakehouse and Warehouse lineage.** The connector lists each workspace's Fabric items and registers the SQL analytics endpoint of every Lakehouse (one `GET lakehouses/{id}` call per lakehouse) and Warehouse (a warehouse is its own endpoint). A semantic-model table that reads one of them, either in DirectLake mode or through an Import/DirectQuery `Sql.Database("<endpoint>.datawarehouse.fabric.microsoft.com", ...)` query (a table navigation or a native `[Query=...]`), gets upstream lineage to the OneLake table (`fabric-onelake` platform, the same URN the OneLake connector emits) instead of a generic `mssql` one. The `Sql.Database` mapping applies in both metadata modes, since the admin scan also lists the workspace's Lakehouses and Warehouses. Map the workspace id in `server_to_platform_instance` to set the OneLake `platform_instance` and `env`. These OneLake edges are not subject to `dataset_type_mapping`, same as DirectLake lineage, so narrowing that mapping never turns such an edge into none; Dataflow Gen2 entities get the same mapping. The URNs match the OneLake connector's when that source runs with `convert_urns_to_lowercase: true` or this one with `convert_lineage_urns_to_lowercase: false` (by default Power BI lowercases the whole lineage URN while the OneLake connector keeps schema and table casing). A `Sql.Database` query may name the endpoint by id or by the item's display name. In `workspace_apis` mode a display name only matches on the workspace's own endpoint host; the admin scan reports no host, so there a display name matches the workspace's item on any host. A query naming an endpoint that is not among the workspace's items (for example a lakehouse in a workspace outside your workspace patterns) keeps its generic `mssql` edge and is reported as a `Fabric Endpoint Not Resolved` warning, and a display name shared by several items is reported as `Fabric Endpoint Name Ambiguous`. A `Sql.Databases` navigation, a navigation without an `Item`, or an endpoint behind a dataset parameter the connector could not resolve (the server argument is a parameter missing from the dataset) is not mapped: the first two are reported as `Fabric Endpoint M Shape Unsupported`, the last falls through to the generic SQL Server handling. Datamarts, mirrored databases and SQL databases are not covered: the OneLake connector does not ingest their tables, so no edge is emitted for them.

In both metadata API modes a calculated column (one defined by a DAX expression) gets no column-level edge to the upstream table. In `workspace_apis` mode or with `enrich_from_item_definitions`, column lineage additionally follows each column's TMDL `sourceColumn`, so a field renamed in the model still points at the right column of the upstream table; a calculated table always gets table-level lineage from the model tables its DAX reads, and a measure that reads columns of other tables always gets column-level edges from them. Set `extract_dax_reference_lineage: true` to also derive lineage from the rest of the DAX: a calculated column gets column-level edges from the columns and measures its expression reads, and a measure that references another measure gets an edge from it. Edges are only emitted to tables and fields that exist in the parsed model. A DAX reference that does not resolve is counted in the report and surfaced as a `DAX Reference Not Resolved` warning. DAX is only read from TMDL definitions, so this applies to `workspace_apis` mode or `enrich_from_item_definitions`; without the flag only the table-qualified references of measures and the tables read by calculated tables are checked. Enabling the flag makes the connector write `upstreamLineage` on tables that previously had none (for example a measures-only table whose measures read each other), which replaces any upstreams authored for those tables in the UI. The flag requires `extract_column_level_lineage`.

Set `extract_model_properties: true` to also ingest the model properties the TMDL definition carries. Each schema field gets `isPartOfKey` from `isKey`, `nullable` from an explicit `isNullable` (an explicit `isNullable: false` is the same as the aspect's default), and a JSON object in its `jsonProps` with the rest: `isHidden` (only written when true), `formatString`, `displayFolder`, `dataCategory`, `sortByColumn` and `summarizeBy` (omitted when it is the Desktop default `none`) for columns, and `isHidden`, `formatString`, `displayFolder` and `hasKpi` for measures. Each table's custom properties gain `storageMode` (`Import`, `DirectQuery`, `Dual`, `DirectLake` or `Push`), `partitionCount`, `incrementalRefresh: true` with the `refreshPolicy.rollingWindowGranularity`, `refreshPolicy.rollingWindowPeriods`, `refreshPolicy.incrementalGranularity` and `refreshPolicy.incrementalPeriods` settings when the table has a refresh policy, the row-level-security roles that filter the table as `rlsRoles` (a JSON list of `{role, filter}`) with `rlsRoleCount`, and every dataset parameter as `parameter.<name>` with its current value cut to 1000 characters. The RLS `filter` is the role's DAX exactly as authored, so it can contain hard-coded user names or emails if the model's author wrote them into the filter; a role filtering a table that is not in the model is reported as an `RLS Filter Table Not Found` warning. A parameter whose name contains `secret`, `token`, `password`, `pwd`, `pass`, `credential`, `key`, `auth`, `connection`, `sas`, `signature`, `cert`, `private`, `jwt` or `bearer` (substring match, so over-masking is the safe direction), or that has `pat` as a whole word (`PAT`, `GitHubPAT`, `my_pat`, but not `FilePath` or `Pattern`), is emitted with the value `***`. Role members are identities and are never ingested; a role file that cannot be parsed is reported as a `TMDL Role Not Parsed` warning and does not fail the model. The flag requires `extract_dataset_schema`.
Expand Down
18 changes: 18 additions & 0 deletions metadata-ingestion/src/datahub/ingestion/source/powerbi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,24 @@ class PowerBiDashboardSourceReport(StaleEntityRemovalSourceReport):
fabric_report_definitions_denied: int = 0
dataset_parameters_failed: int = 0
fabric_lro_timeouts: int = 0
# Fabric SQL analytics endpoints registered from the item listing: a
# warehouse is its own endpoint, a lakehouse's comes from its properties.
fabric_warehouse_endpoints_registered: int = 0
fabric_lakehouse_endpoints_registered: int = 0
# Lakehouses whose properties call failed, so their endpoint is unknown;
# DirectLake tables over them lose only the OneLake edge.
fabric_lakehouse_endpoints_unresolved: int = 0
# Distinct (table, endpoint, schema, table name) Sql.Database references
# over a Fabric endpoint host, not per emission: swapped for OneLake
# edges, naming an endpoint that is not among the workspace's items
# (mssql edge kept), or naming a display name shared by several items.
fabric_endpoint_references_resolved: int = 0
fabric_endpoint_references_unresolved: int = 0
fabric_endpoint_references_ambiguous: int = 0
# Fabric endpoint queries in a shape not mapped to OneLake (Sql.Databases
# navigation, a navigation without Item, an unqualified native-query
# table); per table.
fabric_endpoint_m_shapes_unsupported: int = 0
tmdl_tables_parsed: int = 0
tmdl_parts_failed: int = 0
tmdl_parts_incomplete: int = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ class ReferencedTable:
class DataPlatformTable:
data_platform_pair: DataPlatformPair
urn: str
# Set when the mapper swapped an mssql edge for the OneLake table behind
# a Fabric SQL analytics endpoint; such an edge is kept even when
# dataset_type_mapping was narrowed, like DirectLake lineage, so a
# narrowed mapping never turns an existing edge into none.
from_fabric_endpoint: bool = False


@dataclass(frozen=True)
Expand All @@ -85,6 +90,23 @@ class DataflowReference:
entity: str


@dataclass(frozen=True)
class FabricSqlEndpointReference:
"""A ``Sql.Database`` navigation whose server is a Fabric SQL analytics
endpoint host. ``database`` is what the query named: the endpoint id (as
DirectLake's shared expression does) or the item's display name (as Power
BI Desktop writes it). Only the mapper, which knows the workspace's
Fabric items, can turn it into the OneLake table it reads; until then the
lineage carries the table under the generic MSSQL platform at
``mssql_urn``."""

server: str
database: str
schema_name: Optional[str]
table_name: str
mssql_urn: str


@dataclass
class Lineage:
upstreams: List[DataPlatformTable]
Expand All @@ -94,6 +116,9 @@ class Lineage:
# lineage applies renames to the query's output names inside parse_custom_sql.
downstream_names_are_powerbi_fields: bool = True
dataflow_references: List[DataflowReference] = field(default_factory=list)
fabric_endpoint_references: List[FabricSqlEndpointReference] = field(
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
default_factory=list
)

@staticmethod
def empty() -> "Lineage":
Expand Down
Loading