From 133243ec9e419716e3690593d55f120f4e239f1d Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Sun, 22 Sep 2024 19:13:25 +0100 Subject: [PATCH 1/2] Add required 'begin' config for testing microbatch models --- .../tests/adapter/incremental/test_incremental_microbatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py index 62c21c55..5bbabbe1 100644 --- a/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py +++ b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py @@ -22,7 +22,7 @@ """ _microbatch_model_sql = """ -{{ config(materialized='incremental', incremental_strategy='microbatch', unique_key='id', event_time='event_time', batch_size='day') }} +{{ config(materialized='incremental', incremental_strategy='microbatch', unique_key='id', event_time='event_time', batch_size='day', begin=modules.datetime.datetime(2020, 1, 1, 0, 0, 0)) }} select * from {{ ref('input_model') }} """ From c9310896c8186bc8d96c82dae7457bbc2b06ce28 Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Mon, 23 Sep 2024 18:47:26 +0100 Subject: [PATCH 2/2] changelog entry --- .changes/unreleased/Under the Hood-20240923-184719.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20240923-184719.yaml diff --git a/.changes/unreleased/Under the Hood-20240923-184719.yaml b/.changes/unreleased/Under the Hood-20240923-184719.yaml new file mode 100644 index 00000000..35e66b90 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240923-184719.yaml @@ -0,0 +1,7 @@ +kind: Under the Hood +body: 'dbt-tests-adapters: Add required begin to microbatch model config to BaseMicrobatch + test' +time: 2024-09-23T18:47:19.171618+01:00 +custom: + Author: michelleark + Issue: "315"