-
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
Snowflake query tag #2555
Merged
beckjake
merged 12 commits into
dbt-labs:dev/marian-anderson
from
DrMcTaco:snowflake-query-tag
Jun 25, 2020
Merged
Snowflake query tag #2555
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
331b961
add query tag to snoflake connection dataclass and set tag on new con…
DrMcTaco d8b31c0
add query tag to the snowflake adapter config
DrMcTaco 38975ec
add snowflake macros to support fetching current session query tag, u…
DrMcTaco be61e67
add query tag update macros to each snowflake materialization
DrMcTaco 5c18409
update CHANGELOG.md
DrMcTaco ccae4a8
Merge branch 'dev/marian-anderson' into snowflake-query-tag
DrMcTaco 2cc5332
remove incorrect 2nd arg to config.get
DrMcTaco f3aaa8b
Merge branch 'snowflake-query-tag' of https://github.com/DrMcTaco/dbt…
DrMcTaco 49fec95
Merge branch 'dev/marian-anderson' into snowflake-query-tag
DrMcTaco c89ea1a
fix CHANGELOG formatting
DrMcTaco 25a06ae
Merge branch 'dev/marian-anderson' into snowflake-query-tag
DrMcTaco 2945a91
Merge branch 'dev/marian-anderson' into snowflake-query-tag
beckjake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
plugins/snowflake/dbt/include/snowflake/macros/materializations/view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{% materialization view, adapter='snowflake' -%} | ||
|
||
{% set original_query_tag = set_query_tag() %} | ||
{% set to_return = create_or_replace_view() %} | ||
|
||
{% set target_relation = this.incorporate(type='view') %} | ||
{% do persist_docs(target_relation, model, for_columns=false) %} | ||
|
||
{% do return(to_return) %} | ||
|
||
{% do unset_query_tag(original_query_tag) %} | ||
|
||
{%- endmaterialization %} |
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.
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.
There's no reasonable way for you to know this, but
config.get
doesn't do what you think it does! The second argument isn't a default value, but a "validator". See #2441.