This repository was archived by the owner on Sep 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
dbt/include/snowflake/macros/materializations Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ kind : Under the Hood
2+ body : Use new `batch` context variables over `node.config.__dbt_internal` ones
3+ time : 2024-12-05T14:40:36.373637-05:00
4+ custom :
5+ Author : michelleark
6+ Issue : " 1263"
Original file line number Diff line number Diff line change 5757 {%- set incremental_predicates = [] if arg_dict .get (' incremental_predicates' ) is none else arg_dict .get (' incremental_predicates' ) - %}
5858
5959 {# -- Add additional incremental_predicates to filter for batch --#}
60- {% if model .config .get( " __dbt_internal_microbatch_event_time_start " ) - %}
60+ {% if model .batch and model . batch .event_time_start - %}
6161 {% do incremental_predicates .append (" DBT_INTERNAL_TARGET." ~ model .config .event_time ~ " >= to_timestamp_tz('" ~ model .config .__dbt_internal_microbatch_event_time_start ~ " ')" ) %}
6262 {% endif %}
63- {% if model .config .__dbt_internal_microbatch_event_time_end - %}
63+ {% if model .batch and model . batch .event_time_end - %}
6464 {% do incremental_predicates .append (" DBT_INTERNAL_TARGET." ~ model .config .event_time ~ " < to_timestamp_tz('" ~ model .config .__dbt_internal_microbatch_event_time_end ~ " ')" ) %}
6565 {% endif %}
6666 {% do arg_dict .update ({' incremental_predicates' : incremental_predicates}) %}
You can’t perform that action at this time.
0 commit comments