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-1201] [Bug] Metrics don't require expression field #5871

Closed
2 tasks done
callum-mcdata opened this issue Sep 16, 2022 · 1 comment · Fixed by #5873
Closed
2 tasks done

[CT-1201] [Bug] Metrics don't require expression field #5871

callum-mcdata opened this issue Sep 16, 2022 · 1 comment · Fixed by #5873
Assignees
Labels
bug Something isn't working help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors semantic Issues related to the semantic layer
Milestone

Comments

@callum-mcdata
Copy link
Contributor

callum-mcdata commented Sep 16, 2022

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Ran into this behavior when working with a beta customer. Right now, we provide the default value of empty string ("") to the expression/sql field. That then gets provided to ParsedMetric where it recognizes this field as a string and accepts it, even if the field isn't defined in the metric.

Expected Behavior

If the expression field isn't present, the metric would fail to compile.

Steps To Reproduce

  1. Create a metric without a sql/expression field
  2. Compile/parse
@callum-mcdata callum-mcdata added bug Something isn't working triage metrics labels Sep 16, 2022
@github-actions github-actions bot changed the title [Bug] Metrics don't require expression field [CT-1201] [Bug] Metrics don't require expression field Sep 16, 2022
@jtcohen6 jtcohen6 added this to the v1.3 milestone Sep 19, 2022
@jtcohen6 jtcohen6 added help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors Team:Language labels Sep 19, 2022
@jtcohen6 jtcohen6 removed the triage label Sep 19, 2022
@jtcohen6
Copy link
Contributor

Thanks for the quick issue + PR Callum!

@jtcohen6 jtcohen6 added the semantic Issues related to the semantic layer label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors semantic Issues related to the semantic layer
Projects
None yet
2 participants