-
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-3513] [Bug] tags in properties/schema/etc yml files do not support dbt run --select tag:my_tag
#9317
Comments
dbt run --select tag:my_tag
dbt run --select tag:my_tag
UPD: after additional checks, I also found that Will test on a different machine to see if it is also a case with other os or python version. |
dbt run --select tag:my_tag
dbt run --select tag:my_tag
Thanks for reaching out @IlyaDropit ! Are you trying to point out that column-level tags affect If so, this is expected behavior rather than a bug. The key insight is that depending on which "level" you are adding a tag, it is either being applied to a So if you want a tag to affect ExampleSuppose you have the following project files: Click here to toggle project files
|
Is this a new bug in dbt-core?
Current Behavior
When adding tags in schema.yml/some_yml_transformed_tables.yml, they are not seeing by
dbt run
command. However,dbt test
is working. And I want the super clear here - I apply tags to fact or dimension, tables I transformed with dbt. It was tested with both variants from dbt docs with dbt version1.7.3
and1.7.4
(bellow are code blocks from docs, I was applying tags to actual models so names maybe misleading for my case):Please, note that this is not about dbt_project.yml tags which are working fine.
Tried also running models that are downstream or upstream - didn't work (
dbt run -s tag:my_tag+
ordbt run -s +tag:shopify
)Expected Behavior
According to documentation, these commands are supported:
dbt run --select tag:my_tag
dbt seed --select tag:my_tag
dbt snapshot --select tag:my_tag
dbt test --select tag:my_tag
There is no information on restrictions of tags defined in yml files in dbt's documentation.
Apart from the documentation, I found related tickets that also suggest that tags are supported in the latest versions of dbt in some_file.yml:
#2957 (comment)
#8749
There is also a post in dbt Slack community describing exactly the same problem.
Steps To Reproduce
dbt run -s tag:tag_name
ordbt run -s tag:shopify+
- whatever is relevant for your projectdbt test -s tag:tag_name
ordbt test -s +tag:shopify+
dbt run
suppose to returnNothing to do. Try checking your model configs and model specification args
, butdbt test
should work.Relevant log output
Environment
Which database adapter are you using with dbt?
postgres
Additional Context
Up to now tags were in dbt_project.yml defined on each folder level. Occasionally, tags were defined in config blocks inside models. Both are working fine, no bugs were noticed.
For convenience and efficiency I need to define tags on a more granular level, preferably in yml file where I keep tests and descriptions for materialized tablea to add them under model/source name. Unfortunately, it didn't work. Tried to remove all tags from config blocks - didn't work either.
The text was updated successfully, but these errors were encountered: