Skip to content

Commit

Permalink
Update incremental-microbatch.md (#6265)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Oct 9, 2024
2 parents 12a55d5 + e97364d commit 49060fe
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions website/docs/docs/build/incremental-microbatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ The `page_view_start` column in `page_views` is configured as that model's `even
```yaml
models:
- name: page_views
config:
event_time: page_view_start
config:
event_time: page_view_start
```
</File>
We run the `sessions` model on October 1, 2024, and then again on October 2. It produces the following queries:
Expand All @@ -52,7 +52,8 @@ We run the `sessions` model on October 1, 2024, and then again on October 2. It
materialized='incremental',
incremental_strategy='microbatch',
event_time='session_start',
begin='2020-01-01'
begin='2020-01-01',
batch_size='day'
) }}
with page_views as (
Expand Down Expand Up @@ -152,7 +153,7 @@ Several configurations are relevant to microbatch models, and some are required:
|----------|------|---------------|---------|
| `event_time` | Column (required) | The column indicating "at what time did the row occur." Required for your microbatch model and any direct parents that should be filtered. | N/A |
| `begin` | Date (required) | The "beginning of time" for the microbatch model. This is the starting point for any initial or full-refresh builds. For example, a daily-grain microbatch model run on `2024-10-01` with `begin = '2023-10-01` will process 366 batches (it's a leap year!) plus the batch for "today." | N/A |
| `batch_size` | String (optional) | The granularity of your batches. The default is `day` (and currently this is the only granularity supported). | `day` |
| `batch_size` | String (required) | The granularity of your batches. The default is `day` (and currently this is the only granularity supported). | `day` |
| `lookback` | Integer (optional) | Process X batches prior to the latest bookmark to capture late-arriving records. | `0` |

<Lightbox src="/img/docs/building-a-dbt-project/microbatch/event_time.png" title="The event_time column configures the real-world time of this record"/>
Expand Down Expand Up @@ -267,8 +268,8 @@ Where you’ve also set an `event_time` for the model’s direct parents - in th
```yaml
models:
- name: stg_events
config:
event_time: my_time_field
config:
event_time: my_time_field
```

</File>
Expand Down

0 comments on commit 49060fe

Please sign in to comment.