Skip to content

Conversation

eakmanrq
Copy link
Contributor

@eakmanrq eakmanrq commented Sep 5, 2025

Prior to this PR, users could opt-in to using the incremental by time range SQLMesh behavior by adding a time_column property to their incremental config and then setting {% if sqlmesh_incremental is defined %} jinja block.

This PR deprecates this behavior (but still supports it for now) and add a new incremental strategy called incremental_by_time_range. This gives SQLMesh it's own API for defining it's specific fields and removes the need for defining a jinja code block to activate it.

@eakmanrq eakmanrq force-pushed the eakmanrq/dbt_add_incremental_by_time_range_strategy branch from feaf7e5 to b477bcd Compare September 5, 2025 20:57
f"Supported strategies include {collection_to_str(INCREMENTAL_BY_TIME_RANGE_STRATEGIES)}."
)

if self.time_column and strategy not in {"incremental_by_time_range", "microbatch"}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we include microbatch here?

@eakmanrq eakmanrq force-pushed the eakmanrq/dbt_add_incremental_by_time_range_strategy branch from db580fc to af1b4f1 Compare September 5, 2025 21:26
@eakmanrq eakmanrq force-pushed the eakmanrq/dbt_add_incremental_by_time_range_strategy branch from af1b4f1 to c7e551f Compare September 5, 2025 21:30
@eakmanrq eakmanrq enabled auto-merge (squash) September 5, 2025 21:32
@eakmanrq eakmanrq merged commit 61a0b11 into main Sep 5, 2025
35 checks passed
@eakmanrq eakmanrq deleted the eakmanrq/dbt_add_incremental_by_time_range_strategy branch September 5, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants