Skip to content

Commit

Permalink
Merge pull request #1 from get-select/add_node_refs
Browse files Browse the repository at this point in the history
Add node refs to query tag
  • Loading branch information
NiallRees authored Feb 11, 2023
2 parents d8d658b + 5aed6e4 commit 5fa4902
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changes/1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## dbt-snowflake-query-tags 1.1.0 - February 11, 2023

### Features

- Add node refs to tag ([#1](https://github.com/get-select/dbt-snowflake-query-tags/pull/1))


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-query-tags 1.1.0 - February 11, 2023

### Features

- Add node refs to tag ([#1](https://github.com/get-select/dbt-snowflake-query-tags/pull/1))



## dbt-snowflake-query-tags 1.0.0 - February 08, 2023

### Features
Expand Down
2 changes: 2 additions & 0 deletions integration_test_project/models/materialized_incremental.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(materialized='incremental') }}

select 1 as a

-- {{ ref('materialized_table') }}
6 changes: 6 additions & 0 deletions macros/query_tags.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
is_incremental=is_incremental(),
) -%}

{%- if model.refs is defined -%}
{%- do tag_dict.update(
node_refs=model.refs
) -%}
{%- endif -%}

{# dbt Cloud stuff #}
{%- if env_var('DBT_CLOUD_PROJECT_ID', False) -%}
{%- do tag_dict.update(
Expand Down

0 comments on commit 5fa4902

Please sign in to comment.