dbt-labs / dbt-docs

Auto-generated data documentation site for dbt projects
Apache License 2.0
139 stars 74 forks source link

[CT-3530] Presence of `saved_queries` breaks lineage viz #486

Closed dbeatty10 closed 3 months ago

dbeatty10 commented 8 months ago

Describe the bug

The lineage visualization fails to render when including saved_queries within models/_properties.yml.

Steps To Reproduce

semantic_models:
  - name: my_semantic_model
    model: ref('metricflow_time_spine')
    # model: ref('my_model')

metrics:
  - name: my_metric
    label: my_metric
    type: derived
    type_params:
      expr: revenue - cost

saved_queries:
  - name: p0_booking
    description: Booking-related metrics that are of the highest priority.
    query_params:
      metrics:
        - my_metric
dbt docs generate
dbt docs serve

Expected behavior

I expected to see the entire lineage instead of a blank lineage:

image

Screenshots and log output

image image

The output of dbt --version:

Core:
  - installed: 1.7.4
  - latest:    1.7.4 - Up to date!

Plugins:
  - databricks: 1.7.3 - Up to date!
  - bigquery:   1.7.2 - Up to date!
  - snowflake:  1.7.1 - Up to date!
  - redshift:   1.7.1 - Up to date!
  - postgres:   1.7.4 - Up to date!
  - duckdb:     1.7.0 - Up to date!
  - spark:      1.7.1 - Up to date!

Additional context

Add any other context about the problem here.