sqlmesh 0.192.2.dev6__py3-none-any.whl → 0.192.3.dev2__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/__init__.py +0 -1
- sqlmesh/core/plan/evaluator.py +193 -362
- sqlmesh/core/plan/explainer.py +28 -12
- sqlmesh/core/plan/stages.py +328 -43
- sqlmesh/core/scheduler.py +17 -16
- sqlmesh/core/state_sync/base.py +11 -11
- sqlmesh/utils/__init__.py +6 -0
- {sqlmesh-0.192.2.dev6.dist-info → sqlmesh-0.192.3.dev2.dist-info}/METADATA +1 -1
- {sqlmesh-0.192.2.dev6.dist-info → sqlmesh-0.192.3.dev2.dist-info}/RECORD +14 -14
- {sqlmesh-0.192.2.dev6.dist-info → sqlmesh-0.192.3.dev2.dist-info}/WHEEL +0 -0
- {sqlmesh-0.192.2.dev6.dist-info → sqlmesh-0.192.3.dev2.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.192.2.dev6.dist-info → sqlmesh-0.192.3.dev2.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.192.2.dev6.dist-info → sqlmesh-0.192.3.dev2.dist-info}/top_level.txt +0 -0
sqlmesh/core/scheduler.py
CHANGED
|
@@ -441,12 +441,27 @@ class Scheduler:
|
|
|
441
441
|
|
|
442
442
|
try:
|
|
443
443
|
with self.snapshot_evaluator.concurrent_context():
|
|
444
|
-
|
|
444
|
+
errors, skipped_intervals = concurrent_apply_to_dag(
|
|
445
445
|
dag,
|
|
446
446
|
evaluate_node,
|
|
447
447
|
self.max_workers,
|
|
448
448
|
raise_on_error=False,
|
|
449
449
|
)
|
|
450
|
+
self.console.stop_evaluation_progress(success=not errors)
|
|
451
|
+
|
|
452
|
+
skipped_snapshots = {i[0] for i in skipped_intervals}
|
|
453
|
+
self.console.log_skipped_models(skipped_snapshots)
|
|
454
|
+
for skipped in skipped_snapshots:
|
|
455
|
+
logger.info(f"SKIPPED snapshot {skipped}\n")
|
|
456
|
+
|
|
457
|
+
for error in errors:
|
|
458
|
+
if isinstance(error.__cause__, CircuitBreakerError):
|
|
459
|
+
raise error.__cause__
|
|
460
|
+
logger.info(str(error), exc_info=error)
|
|
461
|
+
|
|
462
|
+
self.console.log_failed_models(errors)
|
|
463
|
+
|
|
464
|
+
return errors, skipped_intervals
|
|
450
465
|
finally:
|
|
451
466
|
if run_environment_statements:
|
|
452
467
|
execute_environment_statements(
|
|
@@ -604,7 +619,7 @@ class Scheduler:
|
|
|
604
619
|
if not merged_intervals:
|
|
605
620
|
return CompletionStatus.NOTHING_TO_DO
|
|
606
621
|
|
|
607
|
-
errors,
|
|
622
|
+
errors, _ = self.run_merged_intervals(
|
|
608
623
|
merged_intervals=merged_intervals,
|
|
609
624
|
deployability_index=deployability_index,
|
|
610
625
|
environment_naming_info=environment_naming_info,
|
|
@@ -616,20 +631,6 @@ class Scheduler:
|
|
|
616
631
|
audit_only=audit_only,
|
|
617
632
|
)
|
|
618
633
|
|
|
619
|
-
self.console.stop_evaluation_progress(success=not errors)
|
|
620
|
-
|
|
621
|
-
skipped_snapshots = {i[0] for i in skipped_intervals}
|
|
622
|
-
self.console.log_skipped_models(skipped_snapshots)
|
|
623
|
-
for skipped in skipped_snapshots:
|
|
624
|
-
logger.info(f"SKIPPED snapshot {skipped}\n")
|
|
625
|
-
|
|
626
|
-
for error in errors:
|
|
627
|
-
if isinstance(error.__cause__, CircuitBreakerError):
|
|
628
|
-
raise error.__cause__
|
|
629
|
-
logger.info(str(error), exc_info=error)
|
|
630
|
-
|
|
631
|
-
self.console.log_failed_models(errors)
|
|
632
|
-
|
|
633
634
|
return CompletionStatus.FAILURE if errors else CompletionStatus.SUCCESS
|
|
634
635
|
|
|
635
636
|
def _audit_snapshot(
|
sqlmesh/core/state_sync/base.py
CHANGED
|
@@ -108,6 +108,17 @@ class StateReader(abc.ABC):
|
|
|
108
108
|
A set of all the existing snapshot ids.
|
|
109
109
|
"""
|
|
110
110
|
|
|
111
|
+
@abc.abstractmethod
|
|
112
|
+
def refresh_snapshot_intervals(self, snapshots: t.Collection[Snapshot]) -> t.List[Snapshot]:
|
|
113
|
+
"""Updates given snapshots with latest intervals from the state.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
snapshots: The snapshots to refresh.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
The updated snapshots.
|
|
120
|
+
"""
|
|
121
|
+
|
|
111
122
|
@abc.abstractmethod
|
|
112
123
|
def nodes_exist(self, names: t.Iterable[str], exclude_external: bool = False) -> t.Set[str]:
|
|
113
124
|
"""Returns the node names that exist in the state sync.
|
|
@@ -373,17 +384,6 @@ class StateSync(StateReader, abc.ABC):
|
|
|
373
384
|
remove_shared_versions: Whether to remove intervals for snapshots that share the same version with the target snapshots.
|
|
374
385
|
"""
|
|
375
386
|
|
|
376
|
-
@abc.abstractmethod
|
|
377
|
-
def refresh_snapshot_intervals(self, snapshots: t.Collection[Snapshot]) -> t.List[Snapshot]:
|
|
378
|
-
"""Updates given snapshots with latest intervals from the state.
|
|
379
|
-
|
|
380
|
-
Args:
|
|
381
|
-
snapshots: The snapshots to refresh.
|
|
382
|
-
|
|
383
|
-
Returns:
|
|
384
|
-
The updated snapshots.
|
|
385
|
-
"""
|
|
386
|
-
|
|
387
387
|
@abc.abstractmethod
|
|
388
388
|
def promote(
|
|
389
389
|
self,
|
sqlmesh/utils/__init__.py
CHANGED
|
@@ -376,3 +376,9 @@ class CompletionStatus(Enum):
|
|
|
376
376
|
@property
|
|
377
377
|
def is_nothing_to_do(self) -> bool:
|
|
378
378
|
return self == CompletionStatus.NOTHING_TO_DO
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
def to_snake_case(name: str) -> str:
|
|
382
|
+
return "".join(
|
|
383
|
+
f"_{c.lower()}" if c.isupper() and idx != 0 else c.lower() for idx, c in enumerate(name)
|
|
384
|
+
)
|
|
@@ -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=N7Gp191jezHlaoxp_S-6l8vz9T0y5AyYJ2ipf0Ys33w,528
|
|
3
3
|
sqlmesh/magics.py,sha256=gjzoxREb1XT8Yho_PQMlMqhhkLq_sEfBM8S3PTgxvWE,40337
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -24,7 +24,7 @@ sqlmesh/core/node.py,sha256=r4_1MRTPcU0MAlwZ5KzrykLT58B7dkKvHzPCsJmEKD8,14497
|
|
|
24
24
|
sqlmesh/core/notification_target.py,sha256=PPGoDrgbRKxr27vJEu03XqNTQLYTw0ZF_b0yAapxGeI,16158
|
|
25
25
|
sqlmesh/core/reference.py,sha256=k7OSkLqTjPR8WJjNeFj0xAJ297nZUMgb_iTVwKRRKjc,4875
|
|
26
26
|
sqlmesh/core/renderer.py,sha256=KOr7rQ-RfWiS51cEj2fzdhxCrYbU0A5wNTGwKyeqLt4,26636
|
|
27
|
-
sqlmesh/core/scheduler.py,sha256=
|
|
27
|
+
sqlmesh/core/scheduler.py,sha256=9ADqU9YNGABJjx4GOraPC_JbzOv0GpAig8v1w6Hg1ko,36417
|
|
28
28
|
sqlmesh/core/schema_diff.py,sha256=Sp2MoqAngp-yTYevkLaf9jb26SuAdGXoZ54g5MjWowU,30516
|
|
29
29
|
sqlmesh/core/schema_loader.py,sha256=lvrI9k7hr1P4X4E6t3U-KrcuvdQuw0UdNlN90P2s52w,3563
|
|
30
30
|
sqlmesh/core/selector.py,sha256=_hcktUQiKXCPE-mOqXClHUVWBfEZKMPVVNDtpSSRhbI,12660
|
|
@@ -93,19 +93,19 @@ sqlmesh/core/model/kind.py,sha256=ZyjfGuXO5pSGJfAZC91-RR4Kc2mwL6g3LO0tgew9Ldk,36
|
|
|
93
93
|
sqlmesh/core/model/meta.py,sha256=D9InI9M2-IXeb34vkXNQSLALL8xVXjZ_LXwI-Tqxm7I,21197
|
|
94
94
|
sqlmesh/core/model/schema.py,sha256=OClbAeA8LpW-IiSiLT_TlDWkEqmIIvSk0GXq8SWI-GQ,3443
|
|
95
95
|
sqlmesh/core/model/seed.py,sha256=a0M-1zY1gOkN5ph2GQyataEdBSCtq50YjeFk2LyvInI,5058
|
|
96
|
-
sqlmesh/core/plan/__init__.py,sha256=
|
|
96
|
+
sqlmesh/core/plan/__init__.py,sha256=NKSvM7ZBVjw9ho3J65M1wFvG3KURB8PJ0FHHLmtSF44,443
|
|
97
97
|
sqlmesh/core/plan/builder.py,sha256=OS6igFQvPRLwIxuYT4WYcuWnuSrPfCQArUA6ohxFnZw,41341
|
|
98
98
|
sqlmesh/core/plan/definition.py,sha256=-jAO5EWvZdmn8jU7bMFJcprBPdfTVhSRgAvBPZ6kqBg,13613
|
|
99
|
-
sqlmesh/core/plan/evaluator.py,sha256=
|
|
100
|
-
sqlmesh/core/plan/explainer.py,sha256=
|
|
101
|
-
sqlmesh/core/plan/stages.py,sha256=
|
|
99
|
+
sqlmesh/core/plan/evaluator.py,sha256=w3sZJFRc94kZ2d3s4rRir2sSugtngPQ3uIIFU77y-jY,20157
|
|
100
|
+
sqlmesh/core/plan/explainer.py,sha256=fmnmNNQ1BtkaaX8IiR8dLfyxIN_vAzdI7ufc5OSCTJE,11817
|
|
101
|
+
sqlmesh/core/plan/stages.py,sha256=5K6EMtov7WR2AkT7CpG87dCWGPRTwg1jVdjYeEojVLA,21641
|
|
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
105
|
sqlmesh/core/snapshot/definition.py,sha256=-cMc1jkJQox3BCoW6bk8qtSgMivr6nuKcGpKKkx4x8A,84216
|
|
106
106
|
sqlmesh/core/snapshot/evaluator.py,sha256=QqFcvXcr3NMHJtWy2wBRfDIph9EKPGpHaPg-36YjbDs,89484
|
|
107
107
|
sqlmesh/core/state_sync/__init__.py,sha256=B60xj-_Xk-4jas3UphLvwkuf04G-9AyGckcblXE0aRg,869
|
|
108
|
-
sqlmesh/core/state_sync/base.py,sha256=
|
|
108
|
+
sqlmesh/core/state_sync/base.py,sha256=WLlwcbF53BHsX1jCsVjWewO9Ht7QUsn2ktJ3-q5iK8g,18346
|
|
109
109
|
sqlmesh/core/state_sync/cache.py,sha256=0AsYdQyBqbLdJvkBQ-hDAipsvnn_jSps-nya-Q4XeL0,5337
|
|
110
110
|
sqlmesh/core/state_sync/common.py,sha256=THK-6AGHFBAuLXydD8QhzmzCdyl0BMrz2rB2xpmC99Y,6532
|
|
111
111
|
sqlmesh/core/state_sync/export_import.py,sha256=WJ7sFX2b_RPAFE4yspJRi_4JQnaO23xpJgRxwXD0agA,8709
|
|
@@ -253,7 +253,7 @@ sqlmesh/migrations/v0081_update_partitioned_by.py,sha256=Rj9RDd7WBonbGfTJx3vAqSv
|
|
|
253
253
|
sqlmesh/migrations/v0082_warn_if_incorrectly_duplicated_statements.py,sha256=K-Z0ghTCFSZuAYzNSUXF4L8axihPemM15EOXHcqkK3s,2489
|
|
254
254
|
sqlmesh/migrations/v0083_use_sql_for_scd_time_data_type_data_hash.py,sha256=0r-SlncPec4TBpnQTeblPsiIjIOVKc10GjBVbFPGcFA,148
|
|
255
255
|
sqlmesh/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
256
|
-
sqlmesh/utils/__init__.py,sha256=
|
|
256
|
+
sqlmesh/utils/__init__.py,sha256=hyuWXItTP_-QNczx66UyjGRLjh9E0XGjxSo-SyLgXrk,11060
|
|
257
257
|
sqlmesh/utils/aws.py,sha256=krxyhrKtsMJDEjT567UbGZogjJ9JRHkvAV-Cg3FVndM,1062
|
|
258
258
|
sqlmesh/utils/cache.py,sha256=GITQ3sldwG4vlI0wKIDI7yOr1CND1EI3necAmeCEW8g,4743
|
|
259
259
|
sqlmesh/utils/concurrency.py,sha256=EMgEecfPFN9_2Wjz4TUksJngECGse7fnKVcLswkmhAk,9274
|
|
@@ -275,7 +275,7 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
275
275
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
276
276
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
277
277
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
278
|
-
sqlmesh-0.192.
|
|
278
|
+
sqlmesh-0.192.3.dev2.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
279
279
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
280
280
|
web/client/dist/index.html,sha256=6S_GSRtPwXyr17YSqAWyZ2Prb2puyUa-UdLiZpFtwe4,5472
|
|
281
281
|
web/client/dist/assets/Audits-Dym5PKHr.js,sha256=UZFlxjPaLxv7b4C494dCxXDNY7918lWEkn2FghwDd4E,1041
|
|
@@ -393,8 +393,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
393
393
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
394
394
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
395
395
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
396
|
-
sqlmesh-0.192.
|
|
397
|
-
sqlmesh-0.192.
|
|
398
|
-
sqlmesh-0.192.
|
|
399
|
-
sqlmesh-0.192.
|
|
400
|
-
sqlmesh-0.192.
|
|
396
|
+
sqlmesh-0.192.3.dev2.dist-info/METADATA,sha256=WMOOvsiyDr0eGcvbrTIYoU36BineBkrrdlmXmodwTGU,26690
|
|
397
|
+
sqlmesh-0.192.3.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
398
|
+
sqlmesh-0.192.3.dev2.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
399
|
+
sqlmesh-0.192.3.dev2.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
400
|
+
sqlmesh-0.192.3.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|