lookback
💡Did you know...
Available from dbt v1.9 or with the dbt "Latest" release track.
Definition
Configure a lookback window to reprocess additional batches during microbatch incremental model runs. It processes X batches up to the latest bookmark (the last successfully processed data point) to capture late-arriving records.
Set the lookback to an integer greater than or equal to zero. The default value is 1.  You can configure lookback for a microbatch incremental model in your dbt_project.yml file, property YAML file, or config block.
Examples
The following examples set 2 as the lookback config for the user_sessions model.
Example in the dbt_project.yml file:
dbt_project.yml
models:
  my_project:
    user_sessions:
      +lookback: 2
Example in a properties YAML file:
models/properties.yml
models:
  - name: user_sessions
    config:
      lookback: 2
Example in SQL model config block:
models/user_sessions.sql
{{ config(
    lookback=2
) }}
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
0