Skip to content

Commit

Permalink
Merge branch 'main' into move-to-hatch
Browse files Browse the repository at this point in the history
# Conflicts:
#	setup.py
  • Loading branch information
mikealfare committed Dec 7, 2024
2 parents 7000210 + 457c361 commit a290aa3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20241202-095136.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Support MicrobatchConcurrency
time: 2024-12-02T09:51:36.606097-05:00
custom:
Author: michelleark
Issue: "1260"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20241205-144036.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Use new `batch` context variables over `node.config.__dbt_internal` ones
time: 2024-12-05T14:40:36.373637-05:00
custom:
Author: michelleark
Issue: "1263"
1 change: 1 addition & 0 deletions dbt/adapters/snowflake/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class SnowflakeAdapter(SQLAdapter):
Capability.TableLastModifiedMetadata: CapabilitySupport(support=Support.Full),
Capability.TableLastModifiedMetadataBatch: CapabilitySupport(support=Support.Full),
Capability.GetCatalogForSingleRelation: CapabilitySupport(support=Support.Full),
Capability.MicrobatchConcurrency: CapabilitySupport(support=Support.Full),
}
)

Expand Down
4 changes: 2 additions & 2 deletions dbt/include/snowflake/macros/materializations/merge.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
{%- set incremental_predicates = [] if arg_dict.get('incremental_predicates') is none else arg_dict.get('incremental_predicates') -%}

{#-- Add additional incremental_predicates to filter for batch --#}
{% if model.config.get("__dbt_internal_microbatch_event_time_start") -%}
{% if model.batch and model.batch.event_time_start -%}
{% do incremental_predicates.append("DBT_INTERNAL_TARGET." ~ model.config.event_time ~ " >= to_timestamp_tz('" ~ model.config.__dbt_internal_microbatch_event_time_start ~ "')") %}
{% endif %}
{% if model.config.__dbt_internal_microbatch_event_time_end -%}
{% if model.batch and model.batch.event_time_end -%}
{% do incremental_predicates.append("DBT_INTERNAL_TARGET." ~ model.config.event_time ~ " < to_timestamp_tz('" ~ model.config.__dbt_internal_microbatch_event_time_end ~ "')") %}
{% endif %}
{% do arg_dict.update({'incremental_predicates': incremental_predicates}) %}
Expand Down
Empty file added setup.py
Empty file.

0 comments on commit a290aa3

Please sign in to comment.