sqlmesh 0.225.1.dev17__py3-none-any.whl → 0.225.1.dev19__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/base.py +9 -6
- sqlmesh/core/engine_adapter/trino.py +1 -1
- sqlmesh/core/model/kind.py +2 -2
- sqlmesh/utils/pydantic.py +6 -6
- {sqlmesh-0.225.1.dev17.dist-info → sqlmesh-0.225.1.dev19.dist-info}/METADATA +1 -1
- {sqlmesh-0.225.1.dev17.dist-info → sqlmesh-0.225.1.dev19.dist-info}/RECORD +11 -11
- {sqlmesh-0.225.1.dev17.dist-info → sqlmesh-0.225.1.dev19.dist-info}/WHEEL +0 -0
- {sqlmesh-0.225.1.dev17.dist-info → sqlmesh-0.225.1.dev19.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.225.1.dev17.dist-info → sqlmesh-0.225.1.dev19.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.225.1.dev17.dist-info → sqlmesh-0.225.1.dev19.dist-info}/top_level.txt +0 -0
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.225.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 225, 1, '
|
|
31
|
+
__version__ = version = '0.225.1.dev19'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 225, 1, 'dev19')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -18,7 +18,7 @@ from functools import cached_property, partial
|
|
|
18
18
|
|
|
19
19
|
from sqlglot import Dialect, exp
|
|
20
20
|
from sqlglot.errors import ErrorLevel
|
|
21
|
-
from sqlglot.helper import ensure_list
|
|
21
|
+
from sqlglot.helper import ensure_list, seq_get
|
|
22
22
|
from sqlglot.optimizer.qualify_columns import quote_identifiers
|
|
23
23
|
|
|
24
24
|
from sqlmesh.core.dialect import (
|
|
@@ -1772,7 +1772,7 @@ class EngineAdapter:
|
|
|
1772
1772
|
valid_from_col: exp.Column,
|
|
1773
1773
|
valid_to_col: exp.Column,
|
|
1774
1774
|
execution_time: t.Union[TimeLike, exp.Column],
|
|
1775
|
-
check_columns: t.Union[exp.Star, t.Sequence[exp.
|
|
1775
|
+
check_columns: t.Union[exp.Star, t.Sequence[exp.Expression]],
|
|
1776
1776
|
invalidate_hard_deletes: bool = True,
|
|
1777
1777
|
execution_time_as_valid_from: bool = False,
|
|
1778
1778
|
target_columns_to_types: t.Optional[t.Dict[str, exp.DataType]] = None,
|
|
@@ -1810,7 +1810,7 @@ class EngineAdapter:
|
|
|
1810
1810
|
execution_time: t.Union[TimeLike, exp.Column],
|
|
1811
1811
|
invalidate_hard_deletes: bool = True,
|
|
1812
1812
|
updated_at_col: t.Optional[exp.Column] = None,
|
|
1813
|
-
check_columns: t.Optional[t.Union[exp.Star, t.Sequence[exp.
|
|
1813
|
+
check_columns: t.Optional[t.Union[exp.Star, t.Sequence[exp.Expression]]] = None,
|
|
1814
1814
|
updated_at_as_valid_from: bool = False,
|
|
1815
1815
|
execution_time_as_valid_from: bool = False,
|
|
1816
1816
|
target_columns_to_types: t.Optional[t.Dict[str, exp.DataType]] = None,
|
|
@@ -1885,8 +1885,10 @@ class EngineAdapter:
|
|
|
1885
1885
|
# they are equal or not, the extra check is not a problem and we gain simplified logic here.
|
|
1886
1886
|
# If we want to change this, then we just need to check the expressions in unique_key and pull out the
|
|
1887
1887
|
# column names and then remove them from the unmanaged_columns
|
|
1888
|
-
if check_columns
|
|
1889
|
-
|
|
1888
|
+
if check_columns:
|
|
1889
|
+
# Handle both Star directly and [Star()] (which can happen during serialization/deserialization)
|
|
1890
|
+
if isinstance(seq_get(ensure_list(check_columns), 0), exp.Star):
|
|
1891
|
+
check_columns = [exp.column(col) for col in unmanaged_columns_to_types]
|
|
1890
1892
|
execution_ts = (
|
|
1891
1893
|
exp.cast(execution_time, time_data_type, dialect=self.dialect)
|
|
1892
1894
|
if isinstance(execution_time, exp.Column)
|
|
@@ -1923,7 +1925,8 @@ class EngineAdapter:
|
|
|
1923
1925
|
col_qualified.set("table", exp.to_identifier("joined"))
|
|
1924
1926
|
|
|
1925
1927
|
t_col = col_qualified.copy()
|
|
1926
|
-
t_col.
|
|
1928
|
+
for column in t_col.find_all(exp.Column):
|
|
1929
|
+
column.this.set("this", f"t_{column.name}")
|
|
1927
1930
|
|
|
1928
1931
|
row_check_conditions.extend(
|
|
1929
1932
|
[
|
|
@@ -302,7 +302,7 @@ class TrinoEngineAdapter(
|
|
|
302
302
|
execution_time: t.Union[TimeLike, exp.Column],
|
|
303
303
|
invalidate_hard_deletes: bool = True,
|
|
304
304
|
updated_at_col: t.Optional[exp.Column] = None,
|
|
305
|
-
check_columns: t.Optional[t.Union[exp.Star, t.Sequence[exp.
|
|
305
|
+
check_columns: t.Optional[t.Union[exp.Star, t.Sequence[exp.Expression]]] = None,
|
|
306
306
|
updated_at_as_valid_from: bool = False,
|
|
307
307
|
execution_time_as_valid_from: bool = False,
|
|
308
308
|
target_columns_to_types: t.Optional[t.Dict[str, exp.DataType]] = None,
|
sqlmesh/core/model/kind.py
CHANGED
|
@@ -23,7 +23,7 @@ from sqlmesh.utils.pydantic import (
|
|
|
23
23
|
PydanticModel,
|
|
24
24
|
SQLGlotBool,
|
|
25
25
|
SQLGlotColumn,
|
|
26
|
-
|
|
26
|
+
SQLGlotListOfFieldsOrStar,
|
|
27
27
|
SQLGlotListOfFields,
|
|
28
28
|
SQLGlotPositiveInt,
|
|
29
29
|
SQLGlotString,
|
|
@@ -852,7 +852,7 @@ class SCDType2ByTimeKind(_SCDType2Kind):
|
|
|
852
852
|
|
|
853
853
|
class SCDType2ByColumnKind(_SCDType2Kind):
|
|
854
854
|
name: t.Literal[ModelKindName.SCD_TYPE_2_BY_COLUMN] = ModelKindName.SCD_TYPE_2_BY_COLUMN
|
|
855
|
-
columns:
|
|
855
|
+
columns: SQLGlotListOfFieldsOrStar
|
|
856
856
|
execution_time_as_valid_from: SQLGlotBool = False
|
|
857
857
|
updated_at_name: t.Optional[SQLGlotColumn] = None
|
|
858
858
|
|
sqlmesh/utils/pydantic.py
CHANGED
|
@@ -289,13 +289,13 @@ def column_validator(v: t.Any, values: t.Any) -> exp.Column:
|
|
|
289
289
|
return expression
|
|
290
290
|
|
|
291
291
|
|
|
292
|
-
def
|
|
292
|
+
def list_of_fields_or_star_validator(
|
|
293
293
|
v: t.Any, values: t.Any
|
|
294
|
-
) -> t.Union[exp.Star, t.List[exp.
|
|
294
|
+
) -> t.Union[exp.Star, t.List[exp.Expression]]:
|
|
295
295
|
expressions = _get_fields(v, values)
|
|
296
296
|
if len(expressions) == 1 and isinstance(expressions[0], exp.Star):
|
|
297
297
|
return t.cast(exp.Star, expressions[0])
|
|
298
|
-
return t.cast(t.List[exp.
|
|
298
|
+
return t.cast(t.List[exp.Expression], expressions)
|
|
299
299
|
|
|
300
300
|
|
|
301
301
|
def cron_validator(v: t.Any) -> str:
|
|
@@ -339,7 +339,7 @@ if t.TYPE_CHECKING:
|
|
|
339
339
|
SQLGlotPositiveInt = int
|
|
340
340
|
SQLGlotColumn = exp.Column
|
|
341
341
|
SQLGlotListOfFields = t.List[exp.Expression]
|
|
342
|
-
|
|
342
|
+
SQLGlotListOfFieldsOrStar = t.Union[SQLGlotListOfFields, exp.Star]
|
|
343
343
|
SQLGlotCron = str
|
|
344
344
|
else:
|
|
345
345
|
from pydantic.functional_validators import BeforeValidator
|
|
@@ -352,7 +352,7 @@ else:
|
|
|
352
352
|
SQLGlotListOfFields = t.Annotated[
|
|
353
353
|
t.List[exp.Expression], BeforeValidator(list_of_fields_validator)
|
|
354
354
|
]
|
|
355
|
-
|
|
356
|
-
t.Union[
|
|
355
|
+
SQLGlotListOfFieldsOrStar = t.Annotated[
|
|
356
|
+
t.Union[SQLGlotListOfFields, exp.Star], BeforeValidator(list_of_fields_or_star_validator)
|
|
357
357
|
]
|
|
358
358
|
SQLGlotCron = t.Annotated[str, BeforeValidator(cron_validator)]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=v_spqQEhcnGaahp1yPvMqUIa6mhH3cs3Bc1CznxvCEA,7965
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=psdtWU9vEch00KybYmpnRm5Qzth6gCUELJzpFp9OegQ,723
|
|
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
|
|
@@ -60,7 +60,7 @@ sqlmesh/core/config/ui.py,sha256=jsO-S6_d9NkLZGG5pT4mgKgxMF34KzkDociZAMvCX3U,278
|
|
|
60
60
|
sqlmesh/core/engine_adapter/__init__.py,sha256=y9jZAFdMBkkkRrf0ymfsJJn6s_7Ya6OpDgR4Bf1OG_U,2383
|
|
61
61
|
sqlmesh/core/engine_adapter/_typing.py,sha256=PCXQVpNbUTI3rJQyH_VTx57mDR5emh8b8cAfme6hTW4,1104
|
|
62
62
|
sqlmesh/core/engine_adapter/athena.py,sha256=5BhMaQcpiBkGt_tdT4Dw67t5pCOh-UN9-bQtayFRL3Q,26867
|
|
63
|
-
sqlmesh/core/engine_adapter/base.py,sha256=
|
|
63
|
+
sqlmesh/core/engine_adapter/base.py,sha256=Op7dQG6exOMDT7uHSubMsTdDurjI0XluSaB91vBTt1I,129927
|
|
64
64
|
sqlmesh/core/engine_adapter/base_postgres.py,sha256=WTU0QingaTNM7n-mTVxS-sg4f6jFZGOSryK5IYacveY,7734
|
|
65
65
|
sqlmesh/core/engine_adapter/bigquery.py,sha256=edBWbAbeXA4bOtVG-YNTQbt9qqwL9QFffZti8Ozv-Cw,60923
|
|
66
66
|
sqlmesh/core/engine_adapter/clickhouse.py,sha256=GWGpwdxZd4RqLSAMlOHjtO8nPpSIo3zFeRWnj9eSOrM,36072
|
|
@@ -76,7 +76,7 @@ sqlmesh/core/engine_adapter/risingwave.py,sha256=d_1MxpXNONyyLnuELa7bILkJlLquf4j
|
|
|
76
76
|
sqlmesh/core/engine_adapter/shared.py,sha256=bM4GJSAR0dU3wCqsTl2SIcy2j_8BGusQvnme99l6wnE,13701
|
|
77
77
|
sqlmesh/core/engine_adapter/snowflake.py,sha256=6rMuhuhp2K-UH8dVnmiieucfOevxmK8vR3N5-dj4MDA,33453
|
|
78
78
|
sqlmesh/core/engine_adapter/spark.py,sha256=ZDEg4rx_cvPcLG83PSWu5nkXzChaCbmb7ka2J2ngEEU,23068
|
|
79
|
-
sqlmesh/core/engine_adapter/trino.py,sha256=
|
|
79
|
+
sqlmesh/core/engine_adapter/trino.py,sha256=VMO9zW0kT0XEK7M2ocWBW5Ep7pAUzne70YqhT2_-d4I,18144
|
|
80
80
|
sqlmesh/core/linter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
81
|
sqlmesh/core/linter/definition.py,sha256=1EOhKdF16jmeqISfcrR-8fzMdgXuxpB7wb3QaepBPeU,5564
|
|
82
82
|
sqlmesh/core/linter/helpers.py,sha256=cwKXP4sL6azRtNVGbMfJ5_6Hqq5Xx2M2rRLCgH3Y3ag,10743
|
|
@@ -91,7 +91,7 @@ sqlmesh/core/model/cache.py,sha256=csun0RJguHzKX6-qITcOs4fVP4f8_Ts8qiUVV4sHY6Q,7
|
|
|
91
91
|
sqlmesh/core/model/common.py,sha256=UqOmtbsrl4MYDUOigde2CwME-qdPgRf91QExX4yhAA0,27741
|
|
92
92
|
sqlmesh/core/model/decorator.py,sha256=bL-JuNrdBAikZSjVxnXqeB9i0e9qC7jm7yLjwiZ38aU,9470
|
|
93
93
|
sqlmesh/core/model/definition.py,sha256=1IQ74uUuqfOd6sUVIo_73SGf-MAptWzqLqJdm4eR1wA,117430
|
|
94
|
-
sqlmesh/core/model/kind.py,sha256=
|
|
94
|
+
sqlmesh/core/model/kind.py,sha256=qJdiin09Q0neRFudNnLsDNCvbqD3EHAoK-WCvX-eUJs,40071
|
|
95
95
|
sqlmesh/core/model/meta.py,sha256=ELjprp6rl7dW9a7rs9eyQXScbDImInq35SyasiAriIk,24128
|
|
96
96
|
sqlmesh/core/model/schema.py,sha256=_HMYfzK9wWXh7_CQDIIGnuQUD4aiX3o5D2cRp2sERzc,3387
|
|
97
97
|
sqlmesh/core/model/seed.py,sha256=a0M-1zY1gOkN5ph2GQyataEdBSCtq50YjeFk2LyvInI,5058
|
|
@@ -234,11 +234,11 @@ sqlmesh/utils/metaprogramming.py,sha256=6NQKi9PpYhgJEu0Wr_TztRZZ2Kog4Dic9syNqbvz
|
|
|
234
234
|
sqlmesh/utils/migration.py,sha256=R7Ck6FX-LfcujGy7sgS0kDWlK-xAEBODr3gqIQ8gC08,835
|
|
235
235
|
sqlmesh/utils/pandas.py,sha256=FytTSLcRNtO0-YMvpoDBkkut3yoQJR9mBSKpif8lxug,2497
|
|
236
236
|
sqlmesh/utils/process.py,sha256=vpXcpJ1eIbivs7gZdwTKSJI7OS6kKBebnaBzz75ykvs,2428
|
|
237
|
-
sqlmesh/utils/pydantic.py,sha256
|
|
237
|
+
sqlmesh/utils/pydantic.py,sha256=-yppkVlw6iSBaSiKjbe7OChxL-u3urOS4-KCjJEgsRU,12095
|
|
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.225.1.
|
|
241
|
+
sqlmesh-0.225.1.dev19.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.225.1.
|
|
367
|
-
sqlmesh-0.225.1.
|
|
368
|
-
sqlmesh-0.225.1.
|
|
369
|
-
sqlmesh-0.225.1.
|
|
370
|
-
sqlmesh-0.225.1.
|
|
366
|
+
sqlmesh-0.225.1.dev19.dist-info/METADATA,sha256=3v9pfcybT_JlIPgXaotilDGWXgr3mt_ffFtWNrZpo80,26686
|
|
367
|
+
sqlmesh-0.225.1.dev19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
368
|
+
sqlmesh-0.225.1.dev19.dist-info/entry_points.txt,sha256=sHAf6tQczIM8xZoduN4qaUjV7QEPVUUW_LCT8EDUMv4,155
|
|
369
|
+
sqlmesh-0.225.1.dev19.dist-info/top_level.txt,sha256=RQ-33FPe2IgL0rgossAfJkCRtqslz9b7wFARqiWLC5Q,24
|
|
370
|
+
sqlmesh-0.225.1.dev19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|