In dbt’s recommended layered modeling architecture, the staging layer is intended to provide a clean, one-to-one representation of raw source tables. Each stg_ model should depend only on sources, not on other staging models. This ensures staging remains a simple, transparent layer where data is renamed, recast, standardized, and lightly transformed before being passed to intermediate and mart layers.
In the DAG shown, at least one staging model (for example, stg_line_items or stg_tpch_line_items) appears downstream of another staging model, meaning a stg_ model is referencing another stg_ model. This violates dbt’s recommended modeling practice, because it creates unnecessary complexity in the staging layer and reduces modularity and transparency. Downstream layers such as intermediate (int_) and marts (fct_) should be used to combine, enrich, or join multiple staging outputs.
When staging models depend on each other, it becomes harder to trace lineage, reduces clarity about where transformations occur, and complicates the entire DAG. The proper pattern is:
Sources → Staging (stg_) → Intermediate (int_) → Marts (fct_)
Since the DAG shows staging models referencing other staging models, the rules have indeed been violated.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit