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

[CT-3246] Make specifying semantic layer object label attributes optional #351

Open
1 task done
Tracked by #9116
QMalcolm opened this issue Oct 23, 2023 · 6 comments
Open
1 task done
Tracked by #9116
Labels
Impact: CA Work impacts dbt Labs Cloud Artifacts Team

Comments

@QMalcolm
Copy link
Collaborator

QMalcolm commented Oct 23, 2023

Housekeeping

  • I am a maintainer of dbt-core

Short description

Currently different semantic layer objects treat their label attributes differently. Additionally on some semantic model objects label is Optional, meaning that consumers of the manifest have too look at both the name and label of a semantic layer object to determine what its "Display Name" should be.

To simplify things for people writing yaml, we want to make specifying a label optional. Additionally we want to make life easier people consuming the manifest to only have to look in one place, label, for a semantic layer object's "Display Name".

Acceptance criteria

For the following objects metric, semantic_model, saved_query, dimension, entity, or measure

  • When defining in YAML, the label attribute should be optional
  • If the label attribute is undefined in YAML, it should be defaulted the object's name value

Impact to Other Teams

The semantic layer will be able to depend on the label attribute being present

Will backports be required?

Required? No

Context

No response

@github-actions github-actions bot changed the title Metric labels should be Optional [CT-3246] Metric labels should be Optional Oct 23, 2023
@graciegoheen graciegoheen added the Impact: CA Work impacts dbt Labs Cloud Artifacts Team label Oct 23, 2023
@jtcohen6
Copy link

Alternative proposal from @nhandel: Keep label as required, and just default it to the metric's name if the user doesn't specify a custom value.

@nhandel
Copy link

nhandel commented Nov 10, 2023

I think this is fairly intuitive as a default and relieves some of the burden of customizing every option for the laissez-faire folks.

@QMalcolm
Copy link
Collaborator Author

QMalcolm commented Dec 9, 2023

Removing the backport 1.7.latest label for now because I don't remember getting permission to add said label 🙃

@QMalcolm
Copy link
Collaborator Author

@nhandel + @jtcohen6
It's worth noting that we set label as optional on for all semantic layer objects in the protocols. Thus populating it in core doesn't give consumers of the semantic layer objects or artifacts guarantees of it's existence. The question comes down to how do we want consumers/integrators of the semantic layer objects/artifacts to display what a semantic layer object is called. Should they use the name unless label is specified or should they always use the label?

If it's the former then we should move to make label optional in core, as it is currently in core for all other semantic layer objects. If it's the latter, then we should update all semantic layer objects to make label required and add user friendliness that it defaults to the name value during parsing here in core (this means also updating the protocols in dbt-semantic-interfaces)

@jtcohen6
Copy link

I lean toward the latter approach. It feels much simpler for downstream consumers to say, "If you want a human-friendly name for this semantic object (e.g. to show in a UI), always use label."

@QMalcolm
Copy link
Collaborator Author

@jtcohen6 That's a good enough argument for me. I'll get this issue updated, and get a relevant issue created in #dbt-labs/dbt-semantic-interfaces/issues

@QMalcolm QMalcolm changed the title [CT-3246] Metric labels should be Optional [CT-3246] Make specifying semantic layer object label attributes optional Dec 13, 2023
@Jstein77 Jstein77 transferred this issue from dbt-labs/dbt-core Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: CA Work impacts dbt Labs Cloud Artifacts Team
Projects
None yet
Development

No branches or pull requests

4 participants