dbt-docs icon indicating copy to clipboard operation
dbt-docs copied to clipboard

[Feature] Include filtered dimensions on metrics within the lineage graph

Open mattiasthalen opened this issue 7 months ago • 3 comments

Is this a new bug in dbt-core?

  • [X] I believe this is a new bug in dbt-core
  • [X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When defining a metric by filtering on dimensions from another semantic model, only the primary semantic model is connected in the DAG.

Expected Behavior

All semantic models used in the metric definition are connected as upstream nodes

Steps To Reproduce

  1. Define metric
  2. Filter on condition from another semantic model
  3. Generate docs
  4. Serve docs

Relevant log output

No response

Environment

- OS: mcr.microsoft.com/devcontainers/python:3.12-bullseye
- Python: 3.12.3
- dbt: 1.8.3

Which database adapter are you using with dbt?

No response

Additional Context

In this case Public Health Centers is filtering on values from dimension_units via fact_contacts > link_contacts_units. image

mattiasthalen avatar Jul 05 '24 08:07 mattiasthalen