You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-2Lines changed: 55 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ An example query comment contains:
6
6
7
7
```json
8
8
{
9
-
"dbt_snowflake_query_tags_version": "2.3.0",
9
+
"dbt_snowflake_query_tags_version": "2.3.1",
10
10
"app": "dbt",
11
11
"dbt_version": "1.4.0",
12
12
"project_name": "my_project",
@@ -45,7 +45,7 @@ Query tags are used solely for attaching the `is_incremental` flag, as this isn'
45
45
46
46
```json
47
47
{
48
-
"dbt_snowflake_query_tags_version": "2.3.0",
48
+
"dbt_snowflake_query_tags_version": "2.3.1",
49
49
"app": "dbt",
50
50
"is_incremental": true
51
51
}
@@ -96,6 +96,59 @@ query-comment:
96
96
97
97
That's it! All dbt-issued queries will now be tagged.
98
98
99
+
## Adding additional metadata
100
+
101
+
### Query comments
102
+
103
+
To extend the information added in the query comments, use [meta](https://docs.getdbt.com/reference/resource-configs/meta) or [tag](https://docs.getdbt.com/reference/resource-configs/tags) configs. These are automatically added to the query comments.
104
+
105
+
### Query tags
106
+
107
+
To extend the information added in the query tags, set the [query_tag](https://docs.getdbt.com/reference/resource-configs/snowflake-configs#query-tags) config value to a mapping type. Examples:
the additional information is added by this package.
126
+
127
+
#### Incompatible config
128
+
129
+
Using a non-mapping type in the `query_tag` config will result in a warning, and the config being ignored.
130
+
131
+
Model
132
+
```sql
133
+
{{ config(
134
+
query_tag = 'data team'
135
+
) }}
136
+
137
+
select ...
138
+
```
139
+
140
+
Leads to a warning
141
+
```
142
+
dbt-snowflake-query-tags warning: the query_tag config value of 'data team' is not a mapping type, so is being ignored. If you'd like to add additional query tag information, use a mapping type instead, or remove it to avoid this message.
0 commit comments