sqlmesh 0.206.2.dev3__py3-none-any.whl → 0.206.2.dev5__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/dialect.py +9 -0
- sqlmesh/core/engine_adapter/bigquery.py +20 -8
- {sqlmesh-0.206.2.dev3.dist-info → sqlmesh-0.206.2.dev5.dist-info}/METADATA +1 -1
- {sqlmesh-0.206.2.dev3.dist-info → sqlmesh-0.206.2.dev5.dist-info}/RECORD +9 -9
- {sqlmesh-0.206.2.dev3.dist-info → sqlmesh-0.206.2.dev5.dist-info}/WHEEL +0 -0
- {sqlmesh-0.206.2.dev3.dist-info → sqlmesh-0.206.2.dev5.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.206.2.dev3.dist-info → sqlmesh-0.206.2.dev5.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.206.2.dev3.dist-info → sqlmesh-0.206.2.dev5.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.206.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 206, 2, '
|
|
20
|
+
__version__ = version = '0.206.2.dev5'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 206, 2, 'dev5')
|
sqlmesh/core/dialect.py
CHANGED
|
@@ -13,6 +13,7 @@ from functools import lru_cache
|
|
|
13
13
|
from sqlglot import Dialect, Generator, ParseError, Parser, Tokenizer, TokenType, exp
|
|
14
14
|
from sqlglot.dialects.dialect import DialectType
|
|
15
15
|
from sqlglot.dialects import DuckDB, Snowflake
|
|
16
|
+
import sqlglot.dialects.athena as athena
|
|
16
17
|
from sqlglot.helper import seq_get
|
|
17
18
|
from sqlglot.optimizer.normalize_identifiers import normalize_identifiers
|
|
18
19
|
from sqlglot.optimizer.qualify_columns import quote_identifiers
|
|
@@ -1014,6 +1015,14 @@ def extend_sqlglot() -> None:
|
|
|
1014
1015
|
generators = {Generator}
|
|
1015
1016
|
|
|
1016
1017
|
for dialect in Dialect.classes.values():
|
|
1018
|
+
# Athena picks a different Tokenizer / Parser / Generator depending on the query
|
|
1019
|
+
# so this ensures that the extra ones it defines are also extended
|
|
1020
|
+
if dialect == athena.Athena:
|
|
1021
|
+
tokenizers.add(athena._TrinoTokenizer)
|
|
1022
|
+
parsers.add(athena._TrinoParser)
|
|
1023
|
+
generators.add(athena._TrinoGenerator)
|
|
1024
|
+
generators.add(athena._HiveGenerator)
|
|
1025
|
+
|
|
1017
1026
|
if hasattr(dialect, "Tokenizer"):
|
|
1018
1027
|
tokenizers.add(dialect.Tokenizer)
|
|
1019
1028
|
if hasattr(dialect, "Parser"):
|
|
@@ -324,14 +324,26 @@ class BigQueryEngineAdapter(InsertOverwriteWithMergeMixin, ClusteredByMixin, Row
|
|
|
324
324
|
bq_table = self._get_table(table)
|
|
325
325
|
columns = create_mapping_schema(bq_table.schema)
|
|
326
326
|
|
|
327
|
-
if
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
327
|
+
if include_pseudo_columns:
|
|
328
|
+
if bq_table.time_partitioning and not bq_table.time_partitioning.field:
|
|
329
|
+
columns["_PARTITIONTIME"] = exp.DataType.build("TIMESTAMP", dialect="bigquery")
|
|
330
|
+
if bq_table.time_partitioning.type_ == "DAY":
|
|
331
|
+
columns["_PARTITIONDATE"] = exp.DataType.build("DATE")
|
|
332
|
+
if bq_table.table_id.endswith("*"):
|
|
333
|
+
columns["_TABLE_SUFFIX"] = exp.DataType.build("STRING", dialect="bigquery")
|
|
334
|
+
if (
|
|
335
|
+
bq_table.external_data_configuration is not None
|
|
336
|
+
and bq_table.external_data_configuration.source_format
|
|
337
|
+
in (
|
|
338
|
+
"CSV",
|
|
339
|
+
"NEWLINE_DELIMITED_JSON",
|
|
340
|
+
"AVRO",
|
|
341
|
+
"PARQUET",
|
|
342
|
+
"ORC",
|
|
343
|
+
"DATASTORE_BACKUP",
|
|
344
|
+
)
|
|
345
|
+
):
|
|
346
|
+
columns["_FILE_NAME"] = exp.DataType.build("STRING", dialect="bigquery")
|
|
335
347
|
|
|
336
348
|
return columns
|
|
337
349
|
|
|
@@ -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=GkHFrG1gLZieoa0KISh_GnEoVvscQTNP6ngYs17Oio8,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
|
|
@@ -15,7 +15,7 @@ sqlmesh/core/console.py,sha256=ovjM75l1A2rAi-ud3ovsIKSGwF9TsGYTK8NvokbCdL4,16611
|
|
|
15
15
|
sqlmesh/core/constants.py,sha256=gUABXWYgH_XOSbaZAJsR5o1dmA61JDCvBDyxqqXX3LM,2630
|
|
16
16
|
sqlmesh/core/context.py,sha256=SkTNrp9TUNx469_mWkemhMk4leGDtmblBIWE7S64sk8,127598
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=_Ur55fGLJ58Icsp44I4pVhdi7_JHiHq45mWIco9oFzk,21792
|
|
18
|
-
sqlmesh/core/dialect.py,sha256=
|
|
18
|
+
sqlmesh/core/dialect.py,sha256=lJHcE7D6GvYs1tzbexJb1mi4gltsMUzHeOrhN4ObIdo,51343
|
|
19
19
|
sqlmesh/core/environment.py,sha256=odus40R-YzdQdS_IiUq_tFouUXIhnpwmNwo8dE8Aw1k,13041
|
|
20
20
|
sqlmesh/core/lineage.py,sha256=zjB0Zfamo2Fja2r5SSZPMbrEKTXr1WjozZPVqvxdybI,3143
|
|
21
21
|
sqlmesh/core/loader.py,sha256=N9KPfa-R4BCId7BCLujMkIKwXgxnftC-dD0rP0cpv1w,41088
|
|
@@ -61,7 +61,7 @@ sqlmesh/core/engine_adapter/_typing.py,sha256=_63pYCThfC39UtPVHY3N0H6qJ1YBT32Oqw
|
|
|
61
61
|
sqlmesh/core/engine_adapter/athena.py,sha256=AS1w_l_VrFZsc2CIicElg1dtS9y6q5hHHmTg4ECH-xs,26453
|
|
62
62
|
sqlmesh/core/engine_adapter/base.py,sha256=QUHO4z-5IibBD1pKPfYr04yTroDZ4katsV-GHUmFC-Y,104590
|
|
63
63
|
sqlmesh/core/engine_adapter/base_postgres.py,sha256=DOsOdCJyQAVfA9S0GznuH0J1bonMqYVP_yJLDYcxFYM,6772
|
|
64
|
-
sqlmesh/core/engine_adapter/bigquery.py,sha256=
|
|
64
|
+
sqlmesh/core/engine_adapter/bigquery.py,sha256=oL3xISn6Mw2jnJareKkeoG3XFCGW4lVof4OorXdQfBA,51468
|
|
65
65
|
sqlmesh/core/engine_adapter/clickhouse.py,sha256=LoPdm_s_s-ZxS1XJPA3Et0iOHeJ1LgqTAFbwBdiqE7A,34912
|
|
66
66
|
sqlmesh/core/engine_adapter/databricks.py,sha256=8ZExPIeT3dDh9MTJW8udvmh9LiY-f9HkRAN1Q5Qebhs,14541
|
|
67
67
|
sqlmesh/core/engine_adapter/duckdb.py,sha256=bv1kfcaDtYlAtJBjxxfteG-dIf31-6r-NipfgtNbFKQ,7133
|
|
@@ -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.206.2.
|
|
291
|
+
sqlmesh-0.206.2.dev5.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.206.2.
|
|
410
|
-
sqlmesh-0.206.2.
|
|
411
|
-
sqlmesh-0.206.2.
|
|
412
|
-
sqlmesh-0.206.2.
|
|
413
|
-
sqlmesh-0.206.2.
|
|
409
|
+
sqlmesh-0.206.2.dev5.dist-info/METADATA,sha256=XuhiRPQ_SA4BDrJGBR1B_LqzebGtw-BPVdDjQ2Wvi48,26685
|
|
410
|
+
sqlmesh-0.206.2.dev5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
411
|
+
sqlmesh-0.206.2.dev5.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
412
|
+
sqlmesh-0.206.2.dev5.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
413
|
+
sqlmesh-0.206.2.dev5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|