Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add tags to SavedQuery #366
Add tags to SavedQuery #366
Changes from 1 commit
10794b9
019d648
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theyostalservice Could you add some test cases that verify that tags are "additive" for semantic models when relevant tag configs appear both within
dbt_project.yml
andstuff.yml
files?I'll explain more below 😎
"Clobbering" for
enabled
Saved queries can have configuration added in
dbt_project.yml
as well as properties / "schema" YAML files.Using the
enabled
config as an example:dbt_project.yml
models/_saved_queries.yml
The above would make all saved queries not enabled by default ("disabled"). But then it would enable
saved_query_name
. This is the "clobbering" behavior that most dbt configs have."Additive" for
tags
But for
tags
in semantic models, we might have config like this:dbt_project.yml
models/_saved_queries.yml
The above would make the default tags for saved queries be the following by default:
["tag_1", "tag_2"]
But then
saved_query_name
would have:["tag_1", "tag_2", "tag_3"]
This is the "additive" behavior of tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that
dbt_project.yml
behavior is driven here in dsi - i think it's handled indbt-core
. I can't even find "enabled" in this repo, tbh.@courtneyholcomb - do you know if this is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I can answer this now.
@dbeatty10 - that sort of behavior is not managed in the dsi repo; the extra project-level config stuff is all handled in dbt-core. dbt-labs/dbt-core#10987 isn't ready for review, but in some manually run tests, the updated code there works as you described. :-)
(Specifically, the changes in
core/dbt/parser/schema_yaml_readers.py
produce the change you're looking for. :-) )