Area: Ingestion
Sub-Area: dbt
Applies to: OSS + Cloud
Issue
You expect lineage to flow through ephemeral dbt models (models that dbt never builds as a table or view), but you can't find them in DataHub, or they look different from other models.
You Might Be Asking
- Do I need a recipe setting to get ephemeral model lineage?
- Why does my ephemeral model have no schema or warehouse table?
Cause
No setting is needed. The dbt source emits ephemeral models by default as dbt platform datasets. They appear in lineage as intermediate dbt nodes, and lineage, including column-level lineage, flows through them.
Ephemeral models have these limits:
- They have no schema, because dbt records none.
- They have no warehouse table and no warehouse sibling, because they don't exist in the target platform. Lineage to them points at the dbt node.
- They have no catalog statistics.
- Query entities defined in
meta.querieson an ephemeral model are skipped with a warning.
If you don't see an ephemeral model at all, check two things: whether the recipe filters it out, and whether the recipe is valid.
Solution
-
Make sure the recipe uses real keys.
target_platformis required and has no default. DataHub recipes reject unknown keys, so a recipe with a key such asnode_type_patternfails validation before ingestion starts.node_type_patternwas removed in DataHub 0.9.2.source: type: dbt config: manifest_path: "target/manifest.json" catalog_path: "target/catalog.json" # optional, but recommended target_platform: snowflake # use your warehouse platform -
Check that
entities_enabled.modelsis not set toNO. It defaults toYES. It covers every dbt model whatever its materialization, so it includes ephemeral models. To filter by name, usenode_name_pattern. -
Don't change
write_semanticsfor this problem. It controls whether new tags, terms and owners override the ones this source added before. It does not affect lineage. The default isPATCH. -
Run dbt ingestion again, then open a downstream model in the lineage view. The ephemeral model shows as an intermediate dbt node between its upstreams and downstreams.
For DataHub Cloud, open Admin > Data Sources in the left navigation to edit and run the dbt source.