dbt-labs / dbt-semantic-interfaces

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

Update support for custom granularity in other types #365

Closed WilliamDee closed 6 days ago

WilliamDee commented 1 week ago

Description

Support custom grain by switching the typing to be not on TimeGranularity

Changes to MetricTimeWindow

Because MetricTimeWindow.granularity is now a string, we allow it to be not as strict when ensuring it's a valid granularity during initial yaml parsing (since we don't have access to the custom granularities). Then during validations, we will properly validate that it's a valid grain, and during the transformation step we will remove trailing 's'.

Checklist

Resolves SL-2826

linear[bot] commented 1 week ago

SL-2826 Enable custom granularities for DSI YAML objects

github-actions[bot] commented 1 week 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.

github-actions[bot] commented 1 week 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.