-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from get-select/use_comments_and_query_tags
Use comments and query tags
- Loading branch information
Showing
12 changed files
with
117 additions
and
27 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,10 @@ | ||
## dbt-snowflake-monitoring 3.0.0 - February 26, 2023 | ||
After attempting to use only query comments or query tags in versions 1 and 2, we've learned we actually need both. The reasons for that are: | ||
* The `is_incremental` macro is only available from within the query tag dbt context, and is needed to determine whether a model run is incremental or not. | ||
* Query tags have a maximum character limit of 2000, which is easily exceeded by a list of refs containing more than a few models. | ||
|
||
To upgrade from 2.x.x, follow the latest instructions in the [Quickstart](https://github.com/get-select/dbt-snowflake-monitoring#quickstart). The package is still able to process query metadata generated by previous versions of the package, so no data will be lost on upgrade. | ||
|
||
### Breaking Changes | ||
|
||
- Use query comments and query tags to avoid query tag character limit ([#87](https://github.com/get-select/dbt-snowflake-monitoring/pull/87)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% macro create_merge_objects_udf(relation) %} | ||
|
||
create or replace function {{ relation.database }}.{{ relation.schema }}.merge_objects(obj1 variant, obj2 variant) | ||
returns variant | ||
language javascript | ||
comment = 'Created by dbt-snowflake-monitoring dbt package.' | ||
as | ||
$$ | ||
return x = Object.assign(OBJ1, OBJ2) | ||
$$ | ||
|
||
{% endmacro %} |
File renamed without changes.
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,3 @@ | ||
{% macro get_query_comment(node) %} | ||
{{ return(dbt_snowflake_query_tags.get_query_comment(node)) }} | ||
{% endmacro %} |
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