You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the dbt-core 1.3.0 release with the new v7 manifest, dbt-docs is no longer generating the correct SQL for metrics. When viewing the code section of metrics, the first line is always compiled as
select undefined(undefined)
I think the problem is that some of the metrics attributes/attribute values were renamed, specifically sql -> expression, type -> calculation_method, and type: expression -> calculation_method: derived.
In dbt-docs the metric SQL generator contains logic that still uses the sql, type, and type: expression attributes. Since sql and type are no longer defined they just get compiled as undefined.
1.3.0 did retain backwards compatibility but it did so by replacing the attributes during parsing and not retaining the old ones. This means that when using the old attribute names in a 1.3.0 project the dbt docs site still compiles as undefined(undefined)
Steps To Reproduce
dbt docs generate && dbt docs serve in a 1.3.0 dbt project that contains metrics with either the new or old attribute names.
Expected behavior
When I define metrics in a dbt 1.3.0 project, the SQL in their Code section should be compiled properly.
Screenshots and log output
The output of dbt --version:
Core:
- installed: 1.3.0
- latest: 1.3.0 - Up to date!
Plugins:
- bigquery: 1.3.0 - Up to date!
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Metric SQL generation breaks with dbt-core 1.3.0
[CT-1352] Metric SQL generation breaks with dbt-core 1.3.0
Oct 15, 2022
Describe the bug
After the dbt-core 1.3.0 release with the new v7 manifest, dbt-docs is no longer generating the correct SQL for metrics. When viewing the code section of metrics, the first line is always compiled as
I think the problem is that some of the metrics attributes/attribute values were renamed, specifically
sql -> expression
,type -> calculation_method
, andtype: expression -> calculation_method: derived
.In dbt-docs the metric SQL generator contains logic that still uses the
sql, type, and type: expression
attributes. Since sql and type are no longer defined they just get compiled as undefined.1.3.0 did retain backwards compatibility but it did so by replacing the attributes during parsing and not retaining the old ones. This means that when using the old attribute names in a 1.3.0 project the dbt docs site still compiles as
undefined(undefined)
Steps To Reproduce
dbt docs generate && dbt docs serve
in a 1.3.0 dbt project that contains metrics with either the new or old attribute names.Expected behavior
When I define metrics in a dbt 1.3.0 project, the SQL in their Code section should be compiled properly.
Screenshots and log output
The output of
dbt --version
:Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: