Skip to content

Commit

Permalink
Merge pull request #13 from pratik60/pratik/add_support_for_metadata
Browse files Browse the repository at this point in the history
Add support to use meta field of a resource
  • Loading branch information
NiallRees authored May 26, 2023
2 parents 00ef47d + ae35875 commit 4dbd6bd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20230525-221550.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Add dbt meta to comment metadata
time: 2023-05-25T22:15:50.19853+01:00
custom:
Author: pratik60
PR: "13"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ An example query comment contains:
"node_id": "model.my_project.model_a",
"node_resource_type": "model",
"node_tags": ["tag_1", "tag_2"],
"node_meta": {"owner": "@alice", "model_maturity": "in dev"},
"materialized": "incremental",

-- dbt Cloud only
Expand Down
11 changes: 10 additions & 1 deletion integration_test_project/models/materialized_table.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{{ config(materialized='table', tags='a') }}
{{
config(
meta={
"owner": "@alice",
"model_maturity": "in dev"
},
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_meta=node.config.meta,
node_tags=node.tags,
) -%}

Expand Down

0 comments on commit 4dbd6bd

Please sign in to comment.