We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de3313f commit a5fb205Copy full SHA for a5fb205
dbt/include/sqlite/macros/materializations/incremental/incremental.sql
@@ -4,12 +4,14 @@
4
{%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}
5
6
{%- if unique_key is not none -%}
7
+ {% call statement('sqlite_incremental_upsert') -%}
8
delete
9
from {{ target_relation }}
10
where ({{ unique_key }}) in (
11
select ({{ unique_key }})
12
from {{ tmp_relation }}
13
);
14
+ {%- endcall %}
15
{%- endif %}
16
17
{# difference here is sqlite doesn't want parens around the select query #}
0 commit comments