sqlmesh 0.226.0__py3-none-any.whl → 0.226.1.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.

Potentially problematic release.


This version of sqlmesh might be problematic. Click here for more details.

sqlmesh/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.226.0'
32
- __version_tuple__ = version_tuple = (0, 226, 0)
31
+ __version__ = version = '0.226.1.dev2'
32
+ __version_tuple__ = version_tuple = (0, 226, 1, 'dev2')
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -2081,16 +2081,20 @@ def missing_intervals(
2081
2081
  continue
2082
2082
  snapshot_end_date = existing_interval_end
2083
2083
 
2084
+ snapshot_start_date = max(
2085
+ to_datetime(snapshot_start_date),
2086
+ to_datetime(start_date(snapshot, snapshots, cache, relative_to=snapshot_end_date)),
2087
+ )
2088
+ if snapshot_start_date > to_datetime(snapshot_end_date):
2089
+ continue
2090
+
2084
2091
  missing_interval_end_date = snapshot_end_date
2085
2092
  node_end_date = snapshot.node.end
2086
2093
  if node_end_date and (to_datetime(node_end_date) < to_datetime(snapshot_end_date)):
2087
2094
  missing_interval_end_date = node_end_date
2088
2095
 
2089
2096
  intervals = snapshot.missing_intervals(
2090
- max(
2091
- to_datetime(snapshot_start_date),
2092
- to_datetime(start_date(snapshot, snapshots, cache, relative_to=snapshot_end_date)),
2093
- ),
2097
+ snapshot_start_date,
2094
2098
  missing_interval_end_date,
2095
2099
  execution_time=execution_time,
2096
2100
  deployability_index=deployability_index,
@@ -2295,14 +2299,16 @@ def start_date(
2295
2299
  if not isinstance(snapshots, dict):
2296
2300
  snapshots = {snapshot.snapshot_id: snapshot for snapshot in snapshots}
2297
2301
 
2298
- earliest = snapshot.node.cron_prev(snapshot.node.cron_floor(relative_to or now()))
2299
-
2300
- for parent in snapshot.parents:
2301
- if parent in snapshots:
2302
- earliest = min(
2303
- earliest,
2304
- start_date(snapshots[parent], snapshots, cache=cache, relative_to=relative_to),
2305
- )
2302
+ parent_starts = [
2303
+ start_date(snapshots[parent], snapshots, cache=cache, relative_to=relative_to)
2304
+ for parent in snapshot.parents
2305
+ if parent in snapshots
2306
+ ]
2307
+ earliest = (
2308
+ min(parent_starts)
2309
+ if parent_starts
2310
+ else snapshot.node.cron_prev(snapshot.node.cron_floor(relative_to or now()))
2311
+ )
2306
2312
 
2307
2313
  cache[key] = earliest
2308
2314
  return earliest
@@ -1021,6 +1021,11 @@ class SnapshotEvaluator:
1021
1021
  ):
1022
1022
  import pandas as pd
1023
1023
 
1024
+ try:
1025
+ first_query_or_df = next(queries_or_dfs)
1026
+ except StopIteration:
1027
+ return
1028
+
1024
1029
  query_or_df = reduce(
1025
1030
  lambda a, b: (
1026
1031
  pd.concat([a, b], ignore_index=True) # type: ignore
@@ -1028,6 +1033,7 @@ class SnapshotEvaluator:
1028
1033
  else a.union_all(b) # type: ignore
1029
1034
  ), # type: ignore
1030
1035
  queries_or_dfs,
1036
+ first_query_or_df,
1031
1037
  )
1032
1038
  apply(query_or_df, index=0)
1033
1039
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlmesh
3
- Version: 0.226.0
3
+ Version: 0.226.1.dev2
4
4
  Summary: Next-generation data transformation framework
5
5
  Author-email: "TobikoData Inc." <engineering@tobikodata.com>
6
6
  License: Apache License
@@ -1,5 +1,5 @@
1
1
  sqlmesh/__init__.py,sha256=v_spqQEhcnGaahp1yPvMqUIa6mhH3cs3Bc1CznxvCEA,7965
2
- sqlmesh/_version.py,sha256=A0XnpAil30kME8PbHEuHbeE0DUbE7nXmuITIrsgFGlo,708
2
+ sqlmesh/_version.py,sha256=Ax1JbvxJgh6VP90F-_X2D9P1c8Sm7WwM8C3vCziU9oE,721
3
3
  sqlmesh/magics.py,sha256=xLh3u4eqpVrKRVN5KF3X84RPRqjygAB9AJP1TXwH8hg,42086
4
4
  sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -105,8 +105,8 @@ sqlmesh/core/plan/stages.py,sha256=-Ju9yRQlEFmQoDIsDH_RO0EHdOlRZUVtVT9ag1gzLns,2
105
105
  sqlmesh/core/snapshot/__init__.py,sha256=NUhvP-glftOWwxONK79Bud93yNQJv8ApBUjkV35RhMY,1465
106
106
  sqlmesh/core/snapshot/cache.py,sha256=bgqCR2hyf6r2A_8QP1EnXFK25gDX37-Zg0YeMuETWxg,3934
107
107
  sqlmesh/core/snapshot/categorizer.py,sha256=iNBEqK2KIyTAYURlB9KLfyKCpXN7vjxSqA7QjFa7e5c,2418
108
- sqlmesh/core/snapshot/definition.py,sha256=EHVRyXD58OxB-0fcx_ff9d-TVkdvoXD7NheewbpRQto,96542
109
- sqlmesh/core/snapshot/evaluator.py,sha256=nFmbxx-hhatm29Xzd5OzXXejHZOqsq-E75e_kx6X1Jk,132986
108
+ sqlmesh/core/snapshot/definition.py,sha256=ZjjeiFLglG6zOusjzgaKOWSr_X_77JlMmvHK0C8d6Ms,96692
109
+ sqlmesh/core/snapshot/evaluator.py,sha256=ALO9bfzU9TxtNr1AdMCpnM1iJ_TJmpZKOJyO4UghRKc,133153
110
110
  sqlmesh/core/snapshot/execution_tracker.py,sha256=Ss1oYgH28Fy1mQ4HriX-luE9MG0eLdecrE1SssUveQI,3651
111
111
  sqlmesh/core/state_sync/__init__.py,sha256=vcm3p_e0scP_ZxOs3XPKPG3uPsaxrK_4pnNj0QueDwQ,779
112
112
  sqlmesh/core/state_sync/base.py,sha256=nK5tq5cIT5x5NrTaTurCRX18bSHnhSjEWG20tVqlkZc,19340
@@ -238,7 +238,7 @@ sqlmesh/utils/pydantic.py,sha256=-yppkVlw6iSBaSiKjbe7OChxL-u3urOS4-KCjJEgsRU,120
238
238
  sqlmesh/utils/rich.py,sha256=cwQ5nJ6sgz64xHtoh6_ec7ReV5YpsOGhMtUJnwoRfEI,3549
239
239
  sqlmesh/utils/windows.py,sha256=0F9RdpuuCoG5NiEDXvWlAGCiJ-59OjSAmgFF5wW05aY,1133
240
240
  sqlmesh/utils/yaml.py,sha256=KFBd7hsKNRTtRudGR7d410qUYffQv0EWRcDM8hVNNZg,3025
241
- sqlmesh-0.226.0.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
241
+ sqlmesh-0.226.1.dev2.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
242
242
  sqlmesh_dbt/__init__.py,sha256=awYS5y5mz-1NUmx6i5h5NSTJ7tidRl9NC0FAnFWSF6U,350
243
243
  sqlmesh_dbt/cli.py,sha256=p9foHjAW9ni7BTOJ2loynk47M0Sf43QIJZRggOzF5tc,6351
244
244
  sqlmesh_dbt/console.py,sha256=RwWLYnEZHzn9Xp-e2gbZvkdKbWbBLN146geI84mJitg,1132
@@ -363,8 +363,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
363
363
  web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
364
364
  web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
365
365
  web/server/api/endpoints/table_diff.py,sha256=8XTwgOh6QBbNy_hTM1JuHgRjbnie-pGPrphiW-FNLjQ,6058
366
- sqlmesh-0.226.0.dist-info/METADATA,sha256=YTzhUiGNrD3-6xolnji38W59XTK64DMYgVNtg1Ki54Q,26680
367
- sqlmesh-0.226.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
368
- sqlmesh-0.226.0.dist-info/entry_points.txt,sha256=sHAf6tQczIM8xZoduN4qaUjV7QEPVUUW_LCT8EDUMv4,155
369
- sqlmesh-0.226.0.dist-info/top_level.txt,sha256=RQ-33FPe2IgL0rgossAfJkCRtqslz9b7wFARqiWLC5Q,24
370
- sqlmesh-0.226.0.dist-info/RECORD,,
366
+ sqlmesh-0.226.1.dev2.dist-info/METADATA,sha256=mBQ6RzGGzYbNGYU6WXl5E27VluG71giq0xnCvYuEGOg,26685
367
+ sqlmesh-0.226.1.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
368
+ sqlmesh-0.226.1.dev2.dist-info/entry_points.txt,sha256=sHAf6tQczIM8xZoduN4qaUjV7QEPVUUW_LCT8EDUMv4,155
369
+ sqlmesh-0.226.1.dev2.dist-info/top_level.txt,sha256=RQ-33FPe2IgL0rgossAfJkCRtqslz9b7wFARqiWLC5Q,24
370
+ sqlmesh-0.226.1.dev2.dist-info/RECORD,,