Skip to content

Commit 4dbd6bd

Browse files
authored
Merge pull request #13 from pratik60/pratik/add_support_for_metadata
Add support to use meta field of a resource
2 parents 00ef47d + ae35875 commit 4dbd6bd

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: Add dbt meta to comment metadata
3+
time: 2023-05-25T22:15:50.19853+01:00
4+
custom:
5+
Author: pratik60
6+
PR: "13"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ An example query comment contains:
2727
"node_id": "model.my_project.model_a",
2828
"node_resource_type": "model",
2929
"node_tags": ["tag_1", "tag_2"],
30+
"node_meta": {"owner": "@alice", "model_maturity": "in dev"},
3031
"materialized": "incremental",
3132

3233
-- dbt Cloud only
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
{{ config(materialized='table', tags='a') }}
1+
{{
2+
config(
3+
meta={
4+
"owner": "@alice",
5+
"model_maturity": "in dev"
6+
},
7+
materialized="table",
8+
tags='a'
9+
)
10+
}}
211

312
select 1 as a

macros/query_comment.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
node_schema=node.schema,
2222
node_id=node.unique_id,
2323
node_resource_type=node.resource_type,
24+
node_meta=node.config.meta,
2425
node_tags=node.tags,
2526
) -%}
2627

0 commit comments

Comments
 (0)