sqlmesh 0.207.1.dev6__py3-none-any.whl → 0.207.1.dev7__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/plan/stages.py +1 -13
- sqlmesh/core/snapshot/definition.py +15 -0
- sqlmesh/core/snapshot/evaluator.py +1 -5
- {sqlmesh-0.207.1.dev6.dist-info → sqlmesh-0.207.1.dev7.dist-info}/METADATA +1 -1
- {sqlmesh-0.207.1.dev6.dist-info → sqlmesh-0.207.1.dev7.dist-info}/RECORD +10 -10
- {sqlmesh-0.207.1.dev6.dist-info → sqlmesh-0.207.1.dev7.dist-info}/WHEEL +0 -0
- {sqlmesh-0.207.1.dev6.dist-info → sqlmesh-0.207.1.dev7.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.207.1.dev6.dist-info → sqlmesh-0.207.1.dev7.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.207.1.dev6.dist-info → sqlmesh-0.207.1.dev7.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.207.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 207, 1, '
|
|
20
|
+
__version__ = version = '0.207.1.dev7'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 207, 1, 'dev7')
|
sqlmesh/core/plan/stages.py
CHANGED
|
@@ -8,7 +8,6 @@ from sqlmesh.core.scheduler import merged_missing_intervals, SnapshotToIntervals
|
|
|
8
8
|
from sqlmesh.core.snapshot.definition import (
|
|
9
9
|
DeployabilityIndex,
|
|
10
10
|
Snapshot,
|
|
11
|
-
SnapshotChangeCategory,
|
|
12
11
|
SnapshotTableInfo,
|
|
13
12
|
SnapshotId,
|
|
14
13
|
Interval,
|
|
@@ -251,18 +250,7 @@ class PlanStagesBuilder:
|
|
|
251
250
|
deployability_index = DeployabilityIndex.all_deployable()
|
|
252
251
|
|
|
253
252
|
snapshots_with_schema_migration = [
|
|
254
|
-
s
|
|
255
|
-
for s in snapshots.values()
|
|
256
|
-
if s.is_paused
|
|
257
|
-
and s.is_model
|
|
258
|
-
and not s.is_symbolic
|
|
259
|
-
and (
|
|
260
|
-
not deployability_index_for_creation.is_representative(s)
|
|
261
|
-
or (
|
|
262
|
-
s.is_view
|
|
263
|
-
and s.change_category == SnapshotChangeCategory.INDIRECT_NON_BREAKING
|
|
264
|
-
)
|
|
265
|
-
)
|
|
253
|
+
s for s in snapshots.values() if s.requires_schema_migration_in_prod
|
|
266
254
|
]
|
|
267
255
|
|
|
268
256
|
snapshots_to_intervals = self._missing_intervals(
|
|
@@ -1352,6 +1352,21 @@ class Snapshot(PydanticModel, SnapshotInfoMixin):
|
|
|
1352
1352
|
check_categorical_relative_expression=False,
|
|
1353
1353
|
)
|
|
1354
1354
|
|
|
1355
|
+
@property
|
|
1356
|
+
def requires_schema_migration_in_prod(self) -> bool:
|
|
1357
|
+
"""Returns whether or not this snapshot requires a schema migration when deployed to production."""
|
|
1358
|
+
return (
|
|
1359
|
+
self.is_paused
|
|
1360
|
+
and self.is_model
|
|
1361
|
+
and not self.is_symbolic
|
|
1362
|
+
and (
|
|
1363
|
+
(self.previous_version and self.previous_version.version == self.version)
|
|
1364
|
+
or self.model.forward_only
|
|
1365
|
+
or bool(self.model.physical_version)
|
|
1366
|
+
or self.is_view
|
|
1367
|
+
)
|
|
1368
|
+
)
|
|
1369
|
+
|
|
1355
1370
|
@property
|
|
1356
1371
|
def ttl_ms(self) -> int:
|
|
1357
1372
|
return self.expiration_ts - self.updated_ts
|
|
@@ -918,11 +918,7 @@ class SnapshotEvaluator:
|
|
|
918
918
|
adapter: EngineAdapter,
|
|
919
919
|
deployability_index: DeployabilityIndex,
|
|
920
920
|
) -> None:
|
|
921
|
-
if
|
|
922
|
-
not snapshot.is_paused
|
|
923
|
-
or not snapshot.is_model
|
|
924
|
-
or (deployability_index.is_representative(snapshot) and not snapshot.is_view)
|
|
925
|
-
):
|
|
921
|
+
if not snapshot.requires_schema_migration_in_prod:
|
|
926
922
|
return
|
|
927
923
|
|
|
928
924
|
deployability_index = DeployabilityIndex.all_deployable()
|
|
@@ -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=xBHBtMraEihL6e_pgr_At1XzJkw4wybN0AN7z6-mY1s,528
|
|
3
3
|
sqlmesh/magics.py,sha256=bEzYqXHcM0P3CjyUZ1O9arlmXAdLAhoglKbQ29fD9AE,41842
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -98,12 +98,12 @@ sqlmesh/core/plan/builder.py,sha256=aj-4jDXy7Uk2apMClBNiR_d317PVURhF3XTt5MN-KeA,
|
|
|
98
98
|
sqlmesh/core/plan/definition.py,sha256=yrX_uZMXi29ltkuowWhNUOi1kd0Uq0TQoM574EI6JHo,14019
|
|
99
99
|
sqlmesh/core/plan/evaluator.py,sha256=0oqepq0qZ_tPhAye6Q9gLenBD_8yE3E8AAwt553lz7U,22163
|
|
100
100
|
sqlmesh/core/plan/explainer.py,sha256=aBkvtM9eog_2NIglazSDdG_i9TTCdFSVOkCw5N8O-1k,12028
|
|
101
|
-
sqlmesh/core/plan/stages.py,sha256=
|
|
101
|
+
sqlmesh/core/plan/stages.py,sha256=n2gBzOdal2oMgwHgL2pns9vLZmkKQb1j6qBZnk5y8NE,21830
|
|
102
102
|
sqlmesh/core/snapshot/__init__.py,sha256=Z5HTetNCZGoKF1WAKXk4LWL9dc8EC8lwS2O4TtoBmt4,1317
|
|
103
103
|
sqlmesh/core/snapshot/cache.py,sha256=bgqCR2hyf6r2A_8QP1EnXFK25gDX37-Zg0YeMuETWxg,3934
|
|
104
104
|
sqlmesh/core/snapshot/categorizer.py,sha256=qGG5870mu1jR2whKisSBH_GFbsyh96RnzJDgkN7DV9g,2482
|
|
105
|
-
sqlmesh/core/snapshot/definition.py,sha256=
|
|
106
|
-
sqlmesh/core/snapshot/evaluator.py,sha256=
|
|
105
|
+
sqlmesh/core/snapshot/definition.py,sha256=mYVeH_65o2Bb6DVelhhWuns-bJGBUi4YKfJwmxd28qw,88752
|
|
106
|
+
sqlmesh/core/snapshot/evaluator.py,sha256=SqraUGfD07q_I18m9ZOxfV-cUo3sGZ4RrOaqKRP6FGs,91719
|
|
107
107
|
sqlmesh/core/state_sync/__init__.py,sha256=B60xj-_Xk-4jas3UphLvwkuf04G-9AyGckcblXE0aRg,869
|
|
108
108
|
sqlmesh/core/state_sync/base.py,sha256=AdqWmbhnvRFqVcFK6L01uCvpBVAYGuMrm4P0D3u_NaU,18334
|
|
109
109
|
sqlmesh/core/state_sync/cache.py,sha256=0AsYdQyBqbLdJvkBQ-hDAipsvnn_jSps-nya-Q4XeL0,5337
|
|
@@ -288,7 +288,7 @@ sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,120
|
|
|
288
288
|
sqlmesh/utils/rich.py,sha256=cwQ5nJ6sgz64xHtoh6_ec7ReV5YpsOGhMtUJnwoRfEI,3549
|
|
289
289
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
290
290
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
291
|
-
sqlmesh-0.207.1.
|
|
291
|
+
sqlmesh-0.207.1.dev7.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
292
292
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
293
293
|
web/client/dist/index.html,sha256=SXykdSRNgrT1k6I2dPZPEfpxPjIsi8-yVFijt-naSA4,5472
|
|
294
294
|
web/client/dist/assets/Audits-Jm353fhk.js,sha256=ry6b5IKT3hLAfD5C3T2BqxulfauEV0n0YZ2vsP4eQ_U,1041
|
|
@@ -406,8 +406,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
406
406
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
407
407
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
408
408
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
409
|
-
sqlmesh-0.207.1.
|
|
410
|
-
sqlmesh-0.207.1.
|
|
411
|
-
sqlmesh-0.207.1.
|
|
412
|
-
sqlmesh-0.207.1.
|
|
413
|
-
sqlmesh-0.207.1.
|
|
409
|
+
sqlmesh-0.207.1.dev7.dist-info/METADATA,sha256=eS6d3bzsyn3nVSfUCsz9BkCjOgtlA5dmWW5JbX6KlLM,26685
|
|
410
|
+
sqlmesh-0.207.1.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
411
|
+
sqlmesh-0.207.1.dev7.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
412
|
+
sqlmesh-0.207.1.dev7.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
413
|
+
sqlmesh-0.207.1.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|