Custom microbatch strategy
This flag was removed in dbt Core v2 and in Fusion. The new behavior is always enabled. If you're upgrading, remove this flag from your dbt_project.yml.
| Loading table... |
The require_batched_execution_for_custom_microbatch_strategy flag is only relevant if you already have a custom get_incremental_microbatch_sql macro in your project. If you don't have a custom microbatch macro, you don't need to set this flag — dbt handles microbatching automatically for any model using the microbatch strategy.
Starting in dbt Core v1.12, this flag defaults to true, meaning dbt executes custom microbatch strategies in batches. If you have a custom microbatch macro and set the flag to false, dbt issues a deprecation warning.
Previously, users needed to set the DBT_EXPERIMENTAL_MICROBATCH environment variable to true to prevent unintended interactions with existing custom incremental strategies. Setting DBT_EXPERIMENTAL_MICROBATCH no longer has any effect on runtime functionality.
Impact
This flag is only relevant if your project has a custom get_incremental_microbatch_sql macro. Projects without a custom microbatch macro are unaffected — the built-in macro already runs in batches.
If you have overridden get_incremental_microbatch_sql — typically to work around an adapter limitation or implement a custom partition strategy — your macro is invoked under a batched contract for which it was never written. Possible outcomes:
- The macro ignores the smaller
event_time_start/event_time_endwindow and re-processes the full range every batch, leading to wasted compute, duplicate rows, orMERGE/INSERTconflicts. - The macro errors because it expects a single invocation per run.
- Row counts in the destination table differ between flag values.
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.