-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/support query tags in tests (#210)
* initial test materialization with query tagging * set adapter to snowflake * move over core materialization code for testing * add query tagging macros * revise with jtcohen's version * add validation on query tags for tests * add changelog entry * update changelog again * fix linting issue & update changelog with PR * update changelog using changie
- Loading branch information
1 parent
3265155
commit 25a7d22
Showing
4 changed files
with
29 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Features | ||
body: Support query tags in dbt tests using the `+query_tag` config in `dbt_project.yml` | ||
time: 2022-08-15T23:35:05.967484-06:00 | ||
custom: | ||
Author: matt-winkler | ||
Issue: "211" | ||
PR: "210" |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{%- materialization test, adapter='snowflake' -%} | ||
|
||
{% set original_query_tag = set_query_tag() %} | ||
{% set relations = materialization_test_default() %} | ||
{% do unset_query_tag(original_query_tag) %} | ||
{{ return(relations) }} | ||
|
||
{%- endmaterialization -%} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: view_model_query_tag | ||
columns: | ||
- name: id | ||
tests: | ||
- unique |
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