dbt-labs / dbt-semantic-interfaces

The shared semantic layer definitions that dbt-core and MetricFlow use.
Apache License 2.0
66 stars 13 forks source link

[Bug] Make `expr` required for derived metrics #270

Closed courtneyholcomb closed 3 months ago

courtneyholcomb commented 6 months ago

Is this a new bug in dbt-semantic-interfaces?

Current Behavior

You can define a derived metric without the expr property, but if you try to query it you will get an error.

Expected Behavior

We should have a validation to ensure that the expr property is set for derived metrics.

Steps To Reproduce

Define a derived metric without the expr property. Query it.

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:
- dbt-semantic-interfaces:

Additional Context

No response