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

[SL-1563] [Feature] Add `meta` to Metric/SemanticModel #251

Closed WilliamDee closed 6 months ago

WilliamDee commented 7 months ago

Is this your first time submitting a feature request?

Describe the feature

There has been requests to expose the meta field that's parsed by dbt-core to our interfaces. This would allow users to annotate freely with that field and have that be exposed on our SL APIs. However, this is only supported currently for Metric/SemanticModel, the other are addressed here https://github.com/dbt-labs/dbt-semantic-interfaces/issues/195

Spec changes:

SemanticModels No dbt-core changes needed as it already exists, just need to expose in DSI

semantic_models:
 - name: my_model
   config:
     meta

Metrics Currently, meta exists on the top-level of Metric. @quigley.malcolm mentioned that it should be moved to be nested under config. Then we can make the necessary changes in DSI.

metrics:
 - name: my_metric
   meta: ...

to

metrics:
 - name: my_metric
   config:
     meta: ...

Describe alternatives you've considered

No response

Who will this benefit?

Any users interacting with the SL APIs who needs to annotate their metrics or semantic models via their own structure.

Are you interested in contributing this feature?

No response

Anything else?

No response

From SyncLinear.com | SL-1563

Jstein77 commented 7 months ago

Metrics needs to nest meta under config.

WilliamDee commented 6 months ago

@jordan.stein this is merged btw!