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

Update incremental.sql #49

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions dbt/include/trino/macros/materializations/incremental.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% macro dbt_trino_get_append_sql(tmp_relation, target_relation) %}

{%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%}
{%- set dest_columns = adapter.get_columns_in_relation(tmp_relation) -%}
{%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}
insert into {{ target_relation }}
insert into {{ target_relation }} ({{ dest_cols_csv }})
select {{dest_cols_csv}} from {{ tmp_relation.include(database=true, schema=true) }};

drop table if exists {{ tmp_relation }};
Expand Down