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.
model.batch.id
make_temp_relation
1 parent 6c41bed commit 86efa88Copy full SHA for 86efa88
dbt/include/global_project/macros/adapters/relation.sql
@@ -7,6 +7,11 @@
7
{% endmacro %}
8
9
{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}
10
+ {#-- This ensures microbatch batches get unique temp relations to avoid clobbering --#}
11
+ {% if suffix == '__dbt_tmp' and model.batch %}
12
+ {% set suffix = suffix ~ '_' ~ model.batch.id %}
13
+ {% endif %}
14
+
15
{{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}
16
17
0 commit comments