-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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-1317] Validate source config enabled flag #6030
Comments
github-actions
bot
changed the title
Validate source config enabled flag
[CT-1317] Validate source config enabled flag
Oct 7, 2022
There doesn't seem to be validation for the enabled config for metrics and exposures either. Exposures seem to behave like sources. Metrics will fail, but with a misleading error message. This version: 2
metrics:
- name: number_of_people
label: "Number of people"
description: Total count of people
model: "ref('people')"
calculation_method: count
expression: "*"
timestamp: created_at
time_grains: [day, week, month]
dimensions:
- favorite_color
- loves_dbt
meta:
my_meta: 'testing'
- name: collective_tenure
label: "Collective tenure"
description: Total number of years of team experience
model: "metric('number_of_people')"
calculation_method: sum
expression: tenure
config:
enabled: False and False
timestamp: created_at
time_grains: [day]
filters:
- field: loves_dbt
operator: 'is'
value: 'true' results in Compilation Error in metric collective_tenure (models/metric_y.yml)
Metric 'metric.basic_dbt.collective_tenure' (models/metric_y.yml) depends on a metric named 'number_of_people' which is disabled When in fact |
6 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no validation of the "enabled" config flag for sources, whether in dbt_project.yml or in a schema file. This means that people can set the flag to strange things such as "False and False" and it will be saved with no error message.
The text was updated successfully, but these errors were encountered: