Skip to main content

batch_size

💡Did you know...
Available from dbt v1.9 or with the dbt "Latest" release track.

Definition

The batch_size config determines how large batches are when running a microbatch incremental model. Accepted values are hour, day, month, or year. You can configure batch_size for a model in your project file (dbt_project.yml), property file, or SQL file config.

Examples

The following examples set day as the batch_size for the user_sessions model.

Example of the batch_size config in the dbt_project.yml file:

dbt_project.yml
models:
my_project:
user_sessions:
+batch_size: day

Example in a property file:

models/properties.yml
models:
- name: user_sessions
config:
batch_size: day

Example in SQL file config for a model:

models/user_sessions.sql
{{ config(
materialized='incremental',
batch_size='day'
) }}

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0