Area: Ingestion Issues
Sub-Area: dbt / Fabric OneLake Lineage and Sibling Relationships
Applies to: OSS + Cloud
Issue
You ingest dbt models and Microsoft Fabric OneLake tables into DataHub. Your dbt model shows a sibling and lineage on the fabric-onelake platform, but that entity isn't the table the Fabric OneLake connector ingested. The table from the fabric-onelake connector has no dbt sibling and no dbt lineage. You also see extra fabric-onelake datasets that no Fabric ingestion created.
You Might Be Asking
- Why doesn't my dbt model link to the table the Fabric OneLake connector ingested?
- Is there a transformer such as
FabricUrnRewriterthat fixes this? - Which
fabric-onelakeand dbt recipe settings affect the dataset names? - How do I remove the extra datasets left by earlier dbt runs?
Cause
The two connectors build different dataset names for the same table, so DataHub treats them as two different datasets.
The Fabric OneLake connector names each table by GUIDs, not by display names:
urn:li:dataset:(urn:li:dataPlatform:fabric-onelake,<workspace-guid>.<lakehouse-or-warehouse-guid>.<schema>.<table>,PROD)
If you set platform_instance in the Fabric OneLake recipe, that value goes in front of the name. Tables in a lakehouse without schemas get the schema dbo.
The dbt connector names the same table <database>.<schema>.<table> on the platform you set in target_platform, with target_platform_instance in front if you set it. dbt converts these names to lowercase by default (convert_urns_to_lowercase: true). The dbt connector links each model to this name and writes the dataset under that name whether or not another connector ingested it. That is where the extra fabric-onelake datasets come from.
No dbt setting and no built-in transformer converts dbt's <database>.<schema>.<table> name into the Fabric GUID form. There is no FabricUrnRewriter transformer in DataHub. A recipe that references it fails when the transformer can't load.
Solution
-
Check the names. Open a table that the Fabric OneLake connector ingested and the dbt model's
fabric-onelakesibling, and compare the two URNs. If one has GUIDs and the other has<database>.<schema>.<table>, this article is your issue. -
Use only real keys in the Fabric OneLake recipe. The source has no
workspace_idkey. Select workspaces by display name withworkspace_pattern. The connector docs recommend settingplatform_instanceto your tenant identifier. See Fabric OneLake.source: type: fabric-onelake config: credential: authentication_method: service_principal client_id: ${AZURE_CLIENT_ID} client_secret: ${AZURE_CLIENT_SECRET} tenant_id: ${AZURE_TENANT_ID} platform_instance: "contoso-tenant" workspace_pattern: allow: - "prod-.*" -
In the dbt recipe, set
target_platform: fabric-onelakeand settarget_platform_instanceto the same value as the Fabric OneLakeplatform_instance. See dbt. This makes the platform and instance parts match. It doesn't make the table names match, because dbt still uses<database>.<schema>.<table>and not the GUIDs.source: type: dbt config: target_platform: fabric-onelake target_platform_instance: "contoso-tenant" # ... manifest_path, catalog_path and other dbt settings -
Contact DataHub Support with the two URNs from step 1 if you need the dbt models and the Fabric OneLake tables linked. DataHub doesn't link them automatically today.
-
Clean up datasets left by earlier dbt runs that used a different
target_platformortarget_platform_instance. Preview the delete first, then soft delete:datahub delete --urn "<urn>" --dry-run datahub delete --urn "<urn>"Soft delete is the default and you can undo it. Don't delete the
fabric-onelakedatasets your current dbt recipe points to. The dbt models still link to them. See Removing Metadata from DataHub.