-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-65] [Bug] Metrics' names shouldn’t be allowed to contain spaces #4572
Comments
I think that this was an oversight. We'll discuss what we'd like to accept for the metrics name and fix this. |
@jtcohen6 is the exit criteria here just to prohibit spaces in metric names? |
My preference would be to constrain it pretty severely - right now I'm passing the metric name directly in as a column alias. For example, even the metrics that our internal data team has made will be problematic, cos they're using periods:
Ideally it should be just stuff that's legal in a column name (which also has implications around whether a metric's name can start with a digit). Alternatively, I can tidy up the column alias myself, but that could cause conflicts with any low-code tools built on top of the metrics package that will need to know how to find the resulting column. |
Is there an existing issue for this?
Current Behavior
I'm working on macros to generate SQL to calculate metrics, and want to be able to use
metric.name
as the column alias. I just discovered that they're allowed to contain spaces - I don't know if this was intentional or not considered, but I think it's bad when there's a human-readablelabel
available as well.Expected Behavior
slack users
to be rejected because it's not[_A-Za-z]
(or maybe even just[_a-z]
?)Steps To Reproduce
Relevant log output
No response
Environment
- dbt: 1.0.0
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: