Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add properties_update_dict as optional argument to trino__create_tabl… #431

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20240826-220108.yaml
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 4 additions & 1 deletion dbt/include/trino/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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' -%}
Expand Down