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

Allow metrics in filters #274

Closed courtneyholcomb closed 5 months ago

courtneyholcomb commented 5 months ago

Resolves #273 Resolves SL-1849

Description

Allow users to reference metrics in where filters for metrics, measures, and saved queries. This uses syntax like: {{ Metric('metric_name', group_by=['entity_name', 'dimension_name']) }} = 10 This unlocks new types of metrics that users have been asking for. Some examples can be found in the linked issue and in this design doc.

Checklist

github-actions[bot] commented 5 months ago

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

linear[bot] commented 5 months ago

SL-1849 DSI: allow metrics in where filters