Skip to content

Commit 7c0cc46

Browse files
committed
Retain previous with_settings settings
1 parent 8e8ddab commit 7c0cc46

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

sqlmesh/core/engine_adapter/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def with_settings(self, **kwargs: t.Any) -> EngineAdapter:
165165
extra_kwargs = {
166166
"null_connection": True,
167167
"execute_log_level": kwargs.pop("execute_log_level", self._execute_log_level),
168+
"correlation_id": kwargs.pop("correlation_id", self.correlation_id),
169+
"query_execution_tracker": kwargs.pop(
170+
"query_execution_tracker", self._query_execution_tracker
171+
),
168172
**self._extra_config,
169173
**kwargs,
170174
}

tests/core/test_integration.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8022,7 +8022,7 @@ def test_incremental_by_time_model_ignore_additive_change(tmp_path: Path):
80228022
cron '@daily'
80238023
);
80248024
8025-
SELECT
8025+
SELECT
80268026
*,
80278027
1 as id,
80288028
'test_name' as name,
@@ -8068,7 +8068,7 @@ def test_incremental_by_time_model_ignore_additive_change(tmp_path: Path):
80688068
cron '@daily'
80698069
);
80708070
8071-
SELECT
8071+
SELECT
80728072
*,
80738073
1 as id,
80748074
'other' as other_column,
@@ -8124,7 +8124,7 @@ def test_incremental_by_time_model_ignore_additive_change(tmp_path: Path):
81248124
cron '@daily'
81258125
);
81268126
8127-
SELECT
8127+
SELECT
81288128
*,
81298129
CAST(1 AS STRING) as id,
81308130
'other' as other_column,
@@ -8170,7 +8170,7 @@ def test_incremental_by_time_model_ignore_additive_change(tmp_path: Path):
81708170
cron '@daily'
81718171
);
81728172
8173-
SELECT
8173+
SELECT
81748174
*,
81758175
CAST(1 AS STRING) as id,
81768176
'other' as other_column,
@@ -8344,7 +8344,7 @@ def test_incremental_by_unique_key_model_ignore_additive_change(tmp_path: Path):
83448344
cron '@daily'
83458345
);
83468346
8347-
SELECT
8347+
SELECT
83488348
*,
83498349
1 as id,
83508350
'test_name' as name,
@@ -8389,7 +8389,7 @@ def test_incremental_by_unique_key_model_ignore_additive_change(tmp_path: Path):
83898389
cron '@daily'
83908390
);
83918391
8392-
SELECT
8392+
SELECT
83938393
*,
83948394
2 as id,
83958395
3 as new_column,
@@ -8566,7 +8566,7 @@ def test_incremental_unmanaged_model_ignore_additive_change(tmp_path: Path):
85668566
cron '@daily'
85678567
);
85688568
8569-
SELECT
8569+
SELECT
85708570
*,
85718571
1 as id,
85728572
'test_name' as name,
@@ -8610,7 +8610,7 @@ def test_incremental_unmanaged_model_ignore_additive_change(tmp_path: Path):
86108610
);
86118611
86128612
SELECT
8613-
*,
8613+
*,
86148614
2 as id,
86158615
3 as new_column,
86168616
@start_ds as ds
@@ -9020,7 +9020,7 @@ def test_scd_type_2_by_column_ignore_additive_change(tmp_path: Path):
90209020
cron '@daily'
90219021
);
90229022
9023-
SELECT
9023+
SELECT
90249024
*,
90259025
1 as id,
90269026
'test_name' as name,
@@ -9067,7 +9067,7 @@ def test_scd_type_2_by_column_ignore_additive_change(tmp_path: Path):
90679067
);
90689068
90699069
SELECT
9070-
*,
9070+
*,
90719071
1 as id,
90729072
'stable2' as stable,
90739073
3 as new_column,
@@ -9247,7 +9247,7 @@ def test_incremental_partition_ignore_additive_change(tmp_path: Path):
92479247
cron '@daily'
92489248
);
92499249
9250-
SELECT
9250+
SELECT
92519251
*,
92529252
1 as id,
92539253
'test_name' as name,
@@ -9292,7 +9292,7 @@ def test_incremental_partition_ignore_additive_change(tmp_path: Path):
92929292
);
92939293
92949294
SELECT
9295-
*,
9295+
*,
92969296
1 as id,
92979297
3 as new_column,
92989298
@start_ds as ds
@@ -9526,7 +9526,7 @@ def test_incremental_by_time_model_ignore_additive_change_unit_test(tmp_path: Pa
95269526
cron '@daily'
95279527
);
95289528
9529-
SELECT
9529+
SELECT
95309530
id,
95319531
name,
95329532
ds
@@ -9595,7 +9595,7 @@ def test_incremental_by_time_model_ignore_additive_change_unit_test(tmp_path: Pa
95959595
cron '@daily'
95969596
);
95979597
9598-
SELECT
9598+
SELECT
95999599
id,
96009600
new_column,
96019601
ds

0 commit comments

Comments
 (0)