Skip to content

Commit

Permalink
Merge pull request #148 from get-select/support_different_order_json_…
Browse files Browse the repository at this point in the history
…comment

Support different order json comment
  • Loading branch information
NiallRees authored Mar 15, 2024
2 parents e084b35 + e18ed1d commit 8fef83a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changes/5.0.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## dbt-snowflake-monitoring 5.0.4 - March 15, 2024

### Fixes

- Support different order json comment ([#148](https://github.com/get-select/dbt-snowflake-monitoring/pull/148))


8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

## dbt-snowflake-monitoring 5.0.4 - March 15, 2024

### Fixes

- Support different order json comment ([#148](https://github.com/get-select/dbt-snowflake-monitoring/pull/148))



## dbt-snowflake-monitoring 5.0.3 - January 16, 2024

### Features
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'dbt_snowflake_monitoring'
version: '5.0.3'
version: '5.0.4'
config-version: 2

profile: dbt_snowflake_monitoring
Expand Down
2 changes: 1 addition & 1 deletion models/query_history_enriched.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ query_history as (
-- this removes comments enclosed by /* <comment text> */ and single line comments starting with -- and either ending with a new line or end of string
regexp_replace(query_text, $$(\/\*(.|\n|\r)*?\*\/)|(--.*$)|(--.*(\n|\r))|;$$, '') as query_text_no_comments,

try_parse_json(regexp_substr(query_text, '/\\*\\s({"app":\\s"dbt".*})\\s\\*/', 1, 1, 'ie')) as _dbt_json_comment_meta,
try_parse_json(regexp_substr(query_text, $$\/\*\s*({(.|\n|\r)*"app":\s"dbt"(.|\n|\r)*})\s*\*\/$$, 1, 1, 'ie')) as _dbt_json_comment_meta,
case
when try_parse_json(query_tag)['dbt_snowflake_query_tags_version'] is not null then try_parse_json(query_tag)
end as _dbt_json_query_tag_meta,
Expand Down

0 comments on commit 8fef83a

Please sign in to comment.