Skip to content

Commit

Permalink
Add node tags
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallRees committed Feb 24, 2023
1 parent b5b6d1b commit 4d794b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ An example query comment contains:
"node_schema": "dev",
"node_id": "model.my_project.model_a",
"node_resource_type": "model",
"node_tags": ["tag_1", "tag_2"],
"materialized": "incremental",

-- dbt Cloud only
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized='incremental') }}
{{ config(materialized='incremental', tags=['a', 'b', 'c']) }}

select 1 as a

Expand Down
2 changes: 1 addition & 1 deletion integration_test_project/models/materialized_table.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ config(materialized='table') }}
{{ config(materialized='table', tags='a') }}

select 1 as a
1 change: 1 addition & 0 deletions macros/query_comment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
node_schema=node.schema,
node_id=node.unique_id,
node_resource_type=node.resource_type,
node_tags=node.tags,
) -%}

{%- if node.resource_type != ('seed') -%} {# Otherwise this throws an error saying 'Seeds cannot depend on other nodes.' #}
Expand Down

0 comments on commit 4d794b1

Please sign in to comment.