Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional label attribute protocols #143

Closed
Tracked by #140
QMalcolm opened this issue Sep 7, 2023 · 8 comments · Fixed by #158
Closed
Tracked by #140

Add optional label attribute protocols #143

QMalcolm opened this issue Sep 7, 2023 · 8 comments · Fixed by #158
Assignees
Labels
enhancement New feature or request

Comments

@QMalcolm
Copy link
Collaborator

QMalcolm commented Sep 7, 2023

dbt-core currently allows for specifying an optional label property on metric nodes. However we don't currently specify this on the metric protocol. MetricFlow would like to begin using this property, and would like it to exist on more objects.

We should add an optional label property to the following protocols:

@QMalcolm
Copy link
Collaborator Author

QMalcolm commented Sep 7, 2023

@nhandel should it be added to any other protocols?

@tlento
Copy link
Collaborator

tlento commented Sep 8, 2023

Do we need SemanticModel? It doesn't matter much to me either way, I think Metric, Dimension, and Measure are the most important.

@tlento
Copy link
Collaborator

tlento commented Sep 8, 2023

In the originally filed #139 users are requesting the label property be added to entities as well, so we need to consider how that might work.

@ataft
Copy link

ataft commented Sep 8, 2023

I think it's worth the extra effort to have consistency and add label to entities. At the bare minimum, every object in the semantic layer should have:

  1. id/code (dbt calls this name)
  2. label/title
  3. description

Semantic layers should also have attributes for synonyms, formatting, and more, but I understand dbt doesn't want to be too opinionated. Like others, I'll just use the meta attribute for these. I don't see meta in the docs, but it's in the original spec proposal.

@nhandel
Copy link

nhandel commented Sep 10, 2023

@QMalcolm this should also be added to the Entity object. We'll also need to add validation that each Entity with the same name either has the same label specified.

@tlento
Copy link
Collaborator

tlento commented Sep 11, 2023

@ataft support for meta isn't available yet, but it is coming. You can follow along here: dbt-labs/dbt-core#8511

@ataft
Copy link

ataft commented Sep 11, 2023

@tlento I see from that issue that meta is being added for semantic models, but not dimensions and measures?

I was thinking/hoping that the new semantic layer could act as a "universal semantic layer" where I define everything (label, description, aggtype, meta for formatting and NLQ synonyms, etc.) that downstream tools could then just plug into. I was also hoping that the semantic layer YAML would replace the model and columns YAML, so I wouldn't need to define model columns and then separate measures and dimensions (seems redundant). Is the expectation that people will define a model and columns in one schema YAML file, then also define a semantic model with dimensions and metrics?

@emmyoop
Copy link
Member

emmyoop commented Sep 22, 2023

We've added labels in dbt-labs/dbt-core#8646. It is no longer a blocker on labels being supported.

@QMalcolm QMalcolm mentioned this issue Sep 27, 2023
4 tasks
@QMalcolm QMalcolm self-assigned this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants