From b957c4d62faff7402fd00a9bf27e353fb11cf86c Mon Sep 17 00:00:00 2001 From: James Long Date: Mon, 26 Aug 2024 21:32:03 -0600 Subject: [PATCH 1/2] add properties_update_dict as optional argument to trino__create_table_as macro --- dbt/include/trino/macros/adapters.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbt/include/trino/macros/adapters.sql b/dbt/include/trino/macros/adapters.sql index faf72b2d..929756f7 100644 --- a/dbt/include/trino/macros/adapters.sql +++ b/dbt/include/trino/macros/adapters.sql @@ -99,8 +99,11 @@ {%- endif -%} {%- endmacro -%} -{% macro trino__create_table_as(temporary, relation, sql, replace=False) -%} +{% macro trino__create_table_as(temporary, relation, sql, replace=False, properties_update_dict=None) -%} {%- set _properties = config.get('properties') -%} + {%- if properties_update_dict is not None -%} + {%- do _properties.update(properties_update_dict) -%} + {%- endif -%} {%- if replace -%} {%- set or_replace = ' or replace' -%} From 8d6a9bfa6bd714b45fefaf70d25962806c4d3b5e Mon Sep 17 00:00:00 2001 From: James Long Date: Mon, 26 Aug 2024 22:02:02 -0600 Subject: [PATCH 2/2] add changelog file --- .changes/unreleased/Features-20240826-220108.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changes/unreleased/Features-20240826-220108.yaml diff --git a/.changes/unreleased/Features-20240826-220108.yaml b/.changes/unreleased/Features-20240826-220108.yaml new file mode 100644 index 00000000..f5871356 --- /dev/null +++ b/.changes/unreleased/Features-20240826-220108.yaml @@ -0,0 +1,7 @@ +kind: Features +body: add properties_update_dict as optional argument to trino__create_table_as macro +time: 2024-08-26T22:01:08.103103-06:00 +custom: + Author: james-long-mx + Issue: "430" + PR: "431"