sqlmesh 0.196.5.dev11__py3-none-any.whl → 0.196.5.dev13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/engine_adapter/mssql.py +17 -15
- sqlmesh/core/plan/explainer.py +13 -8
- {sqlmesh-0.196.5.dev11.dist-info → sqlmesh-0.196.5.dev13.dist-info}/METADATA +1 -1
- {sqlmesh-0.196.5.dev11.dist-info → sqlmesh-0.196.5.dev13.dist-info}/RECORD +9 -9
- {sqlmesh-0.196.5.dev11.dist-info → sqlmesh-0.196.5.dev13.dist-info}/WHEEL +0 -0
- {sqlmesh-0.196.5.dev11.dist-info → sqlmesh-0.196.5.dev13.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.196.5.dev11.dist-info → sqlmesh-0.196.5.dev13.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.196.5.dev11.dist-info → sqlmesh-0.196.5.dev13.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.196.5.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 196, 5, '
|
|
20
|
+
__version__ = version = '0.196.5.dev13'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 196, 5, 'dev13')
|
|
@@ -212,6 +212,7 @@ class MSSQLEngineAdapter(
|
|
|
212
212
|
if merge_filter:
|
|
213
213
|
on = exp.and_(merge_filter, on)
|
|
214
214
|
|
|
215
|
+
match_expressions = []
|
|
215
216
|
if not when_matched:
|
|
216
217
|
match_condition = None
|
|
217
218
|
unique_key_names = [y.name for y in unique_key]
|
|
@@ -230,23 +231,24 @@ class MSSQLEngineAdapter(
|
|
|
230
231
|
)
|
|
231
232
|
)
|
|
232
233
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
exp.column(col,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
234
|
+
if target_columns_no_keys:
|
|
235
|
+
match_expressions.append(
|
|
236
|
+
exp.When(
|
|
237
|
+
matched=True,
|
|
238
|
+
source=False,
|
|
239
|
+
condition=match_condition,
|
|
240
|
+
then=exp.Update(
|
|
241
|
+
expressions=[
|
|
242
|
+
exp.column(col, MERGE_TARGET_ALIAS).eq(
|
|
243
|
+
exp.column(col, MERGE_SOURCE_ALIAS)
|
|
244
|
+
)
|
|
245
|
+
for col in columns_to_types_no_keys
|
|
246
|
+
],
|
|
247
|
+
),
|
|
248
|
+
)
|
|
246
249
|
)
|
|
247
|
-
]
|
|
248
250
|
else:
|
|
249
|
-
match_expressions
|
|
251
|
+
match_expressions.extend(when_matched.copy().expressions)
|
|
250
252
|
|
|
251
253
|
match_expressions.append(
|
|
252
254
|
exp.When(
|
sqlmesh/core/plan/explainer.py
CHANGED
|
@@ -161,7 +161,8 @@ class RichExplainerConsole(ExplainerConsole):
|
|
|
161
161
|
for snapshot, intervals in stage.snapshot_to_intervals.items():
|
|
162
162
|
display_name = self._display_name(snapshot)
|
|
163
163
|
if snapshot.is_model:
|
|
164
|
-
|
|
164
|
+
is_deployable = stage.deployability_index.is_deployable(snapshot)
|
|
165
|
+
table_name = snapshot.table_name(is_deployable)
|
|
165
166
|
model_tree = Tree(f"{display_name} -> {table_name}")
|
|
166
167
|
|
|
167
168
|
for signal_name, _ in snapshot.model.signals:
|
|
@@ -170,26 +171,30 @@ class RichExplainerConsole(ExplainerConsole):
|
|
|
170
171
|
if snapshot.model.pre_statements:
|
|
171
172
|
model_tree.add("Run pre-statements")
|
|
172
173
|
|
|
174
|
+
backfill_tree = Tree("Fully refresh table")
|
|
173
175
|
if snapshot.is_incremental:
|
|
174
176
|
current_intervals = (
|
|
175
177
|
snapshot.intervals
|
|
176
178
|
if stage.deployability_index.is_deployable(snapshot)
|
|
177
179
|
else snapshot.dev_intervals
|
|
178
180
|
)
|
|
181
|
+
# If there are no intervals, the table will be fully refreshed
|
|
179
182
|
if current_intervals:
|
|
180
183
|
formatted_range = SnapshotIntervals(
|
|
181
184
|
snapshot_id=snapshot.snapshot_id, intervals=intervals
|
|
182
185
|
).format_intervals(snapshot.node.interval_unit)
|
|
183
|
-
|
|
186
|
+
backfill_tree = Tree(
|
|
184
187
|
f"Incrementally insert records within the range [{formatted_range}]"
|
|
185
188
|
)
|
|
186
|
-
else:
|
|
187
|
-
# If there are no intervals, the table will be fully refreshed
|
|
188
|
-
model_tree.add("Fully refresh table")
|
|
189
189
|
elif snapshot.is_view:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
backfill_tree = Tree("Recreate view")
|
|
191
|
+
|
|
192
|
+
if not is_deployable:
|
|
193
|
+
backfill_tree.add(
|
|
194
|
+
"[orange1]preview[/orange1]: data will NOT be reused in production"
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
model_tree.add(backfill_tree)
|
|
193
198
|
|
|
194
199
|
if snapshot.model.post_statements:
|
|
195
200
|
model_tree.add("Run post-statements")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=QjwaamJIdW7voXoS880yAx7tHm-Im4_mqGA-XJgafos,7631
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=BKHV3JIrRZRNWSQ43GgmWphF-wRko3Q_Z6doy4LelrE,530
|
|
3
3
|
sqlmesh/magics.py,sha256=R9U0Mp9ZQhDYe751nxAQDLaMv3zLAR4HcTdIflKTmEE,41709
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -66,7 +66,7 @@ sqlmesh/core/engine_adapter/clickhouse.py,sha256=LoPdm_s_s-ZxS1XJPA3Et0iOHeJ1Lgq
|
|
|
66
66
|
sqlmesh/core/engine_adapter/databricks.py,sha256=8ZExPIeT3dDh9MTJW8udvmh9LiY-f9HkRAN1Q5Qebhs,14541
|
|
67
67
|
sqlmesh/core/engine_adapter/duckdb.py,sha256=TlSFSWNzUfjGdhuMyCi1CLwhBaEKyNKtasub9OsYwrc,5199
|
|
68
68
|
sqlmesh/core/engine_adapter/mixins.py,sha256=HMB0Z9O3p5jaTZMolKiWKqpVDZokf5GoI99YXwEJ8bc,22470
|
|
69
|
-
sqlmesh/core/engine_adapter/mssql.py,sha256=
|
|
69
|
+
sqlmesh/core/engine_adapter/mssql.py,sha256=G6XZlLFwF9NcqJs2xkoWtCQY7lXlkRGYp8xpdJOXW4U,17451
|
|
70
70
|
sqlmesh/core/engine_adapter/mysql.py,sha256=lVC-siXZK3iSfqCmBjZNw8uy09Z8la8v8_oUZ-E2OwI,6966
|
|
71
71
|
sqlmesh/core/engine_adapter/postgres.py,sha256=fdQrsBodfGlNf8lZYkS99U_gjoDyaYKEVKLgScduv3I,4601
|
|
72
72
|
sqlmesh/core/engine_adapter/redshift.py,sha256=B4GsPggz-xyvBpx5qubvVwEeKF3vk7n5SMExL-Q5Ysw,16754
|
|
@@ -97,7 +97,7 @@ sqlmesh/core/plan/__init__.py,sha256=NKSvM7ZBVjw9ho3J65M1wFvG3KURB8PJ0FHHLmtSF44
|
|
|
97
97
|
sqlmesh/core/plan/builder.py,sha256=9M8Bzf6SZ3nnawowvu0jHSVCCVblz3srevJoOS7ppkM,41415
|
|
98
98
|
sqlmesh/core/plan/definition.py,sha256=OxgbvkMGNdlvYF2BjFJt_lINsBw38Fq1IX25P8_Z_Z0,13734
|
|
99
99
|
sqlmesh/core/plan/evaluator.py,sha256=DkpJ78R33_RBx5MVY13CcGU0x2-EcKWkcrETsjuyn10,20484
|
|
100
|
-
sqlmesh/core/plan/explainer.py,sha256=
|
|
100
|
+
sqlmesh/core/plan/explainer.py,sha256=BEtww_UVa1gMkzL6-y2yrcy1EMQ8MbkElvO6L6s_TYU,12011
|
|
101
101
|
sqlmesh/core/plan/stages.py,sha256=5cvEbrQsw_cx1gayxwLRwkIehQPixrbUT9B4BbEOj3A,21972
|
|
102
102
|
sqlmesh/core/snapshot/__init__.py,sha256=Z5HTetNCZGoKF1WAKXk4LWL9dc8EC8lwS2O4TtoBmt4,1317
|
|
103
103
|
sqlmesh/core/snapshot/cache.py,sha256=bgqCR2hyf6r2A_8QP1EnXFK25gDX37-Zg0YeMuETWxg,3934
|
|
@@ -283,7 +283,7 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
283
283
|
sqlmesh/utils/rich.py,sha256=BpB47G0-JcU41LkGkeGKroexj4NOV5fox4-GOIXPgIc,3545
|
|
284
284
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
285
285
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
286
|
-
sqlmesh-0.196.5.
|
|
286
|
+
sqlmesh-0.196.5.dev13.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
287
287
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
288
288
|
web/client/dist/index.html,sha256=kNpFjWxt34Pf-P-cROtPWi3GNSVk6zqA3eoN9tlZXI0,5472
|
|
289
289
|
web/client/dist/assets/Audits-DKgXravk.js,sha256=SaVQhNlislD_yQc_KivO7SPi1JH0ts1GnDPD5Zssutw,1041
|
|
@@ -401,8 +401,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
401
401
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
402
402
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
403
403
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
404
|
-
sqlmesh-0.196.5.
|
|
405
|
-
sqlmesh-0.196.5.
|
|
406
|
-
sqlmesh-0.196.5.
|
|
407
|
-
sqlmesh-0.196.5.
|
|
408
|
-
sqlmesh-0.196.5.
|
|
404
|
+
sqlmesh-0.196.5.dev13.dist-info/METADATA,sha256=oYh4rZ36n1gyBmhdbRRfP3y4yAiaNbwl2A_howDpWuM,26571
|
|
405
|
+
sqlmesh-0.196.5.dev13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
406
|
+
sqlmesh-0.196.5.dev13.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
407
|
+
sqlmesh-0.196.5.dev13.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
408
|
+
sqlmesh-0.196.5.dev13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|