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

Updates to metrics + exposures: configs, name validation #2052

Closed
1 task done
jtcohen6 opened this issue Sep 22, 2022 · 0 comments · Fixed by #2104
Closed
1 task done

Updates to metrics + exposures: configs, name validation #2052

jtcohen6 opened this issue Sep 22, 2022 · 0 comments · Fixed by #2104
Assignees
Labels
content Improvements or additions to content dbt-core v1.3 Docs impact for the v1.3 release (Oct 2022) improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@jtcohen6
Copy link
Collaborator

Contributions

  • I have read the contribution docs, and understand what's expected of me.

Link to the page on docs.getdbt.com requiring updates

https://docs.getdbt.com/docs/building-a-dbt-project/metrics
https://docs.getdbt.com/docs/building-a-dbt-project/exposures (we should remove or update the section, "Exposures are new")

What part(s) of the page would you like to see updated?

Metrics + exposures have validation requirements for their names, which they didn't have before. Letters, numbers, and characters only, up to a character limit. Poorly named metrics will raise an error; exposures (which have been around longer) will just raise a deprecation warning for now.

Exposures support a label property for human-friendly titles, just like metrics.

Metrics + exposures can now be configured, with just one built-in config: enabled: True|False.

# models/config.yml
metrics:
  - name: my_metric
    config:
      enabled: false

exposures:
  - name: my_exposure
    config:
      enabled: false
# dbt_project.yml
metrics:
  my_project:
    +enabled: false

exposures:
  my_project:
    +enabled: false

I think metrics are also going to support a config named default_value_null? (dbt-labs/dbt_metrics#96)

Additional information

dbt-labs/dbt-core#5815
dbt-labs/dbt-core#5841
dbt-labs/dbt-core#5844
dbt-labs/dbt_metrics#96

@jtcohen6 jtcohen6 added content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear idea Proposes an idea for new content dbt-core v1.3 Docs impact for the v1.3 release (Oct 2022) labels Sep 22, 2022
@jtcohen6 jtcohen6 self-assigned this Sep 29, 2022
jtcohen6 added a commit that referenced this issue Sep 29, 2022
jtcohen6 added a commit that referenced this issue Oct 3, 2022
* Add -f short name #2055

* Update config selection method #2054

* New metadata context vars #2053

* Update metrics + exposures #2052

* Update 1.3 upgrade guide

* Update website/docs/reference/node-selection/methods.md

Co-authored-by: mirnawong1 <[email protected]>

* Update website/docs/reference/resource-properties/config.md

Co-authored-by: mirnawong1 <[email protected]>

* Update website/docs/reference/node-selection/methods.md

Co-authored-by: mirnawong1 <[email protected]>

* Update website/docs/reference/resource-properties/config.md

Co-authored-by: mirnawong1 <[email protected]>

* Update website/docs/guides/migration/versions/05-upgrading-to-v1.3.md

Co-authored-by: mirnawong1 <[email protected]>

Co-authored-by: mirnawong1 <[email protected]>
@runleonarun runleonarun removed the idea Proposes an idea for new content label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content dbt-core v1.3 Docs impact for the v1.3 release (Oct 2022) improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants