sqlmesh 0.184.3.dev8__py3-none-any.whl → 0.184.3.dev10__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/snowflake.py +18 -3
- {sqlmesh-0.184.3.dev8.dist-info → sqlmesh-0.184.3.dev10.dist-info}/METADATA +1 -1
- {sqlmesh-0.184.3.dev8.dist-info → sqlmesh-0.184.3.dev10.dist-info}/RECORD +8 -8
- {sqlmesh-0.184.3.dev8.dist-info → sqlmesh-0.184.3.dev10.dist-info}/WHEEL +0 -0
- {sqlmesh-0.184.3.dev8.dist-info → sqlmesh-0.184.3.dev10.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.184.3.dev8.dist-info → sqlmesh-0.184.3.dev10.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.184.3.dev8.dist-info → sqlmesh-0.184.3.dev10.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.184.3.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 184, 3, '
|
|
20
|
+
__version__ = version = '0.184.3.dev10'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 184, 3, 'dev10')
|
|
@@ -68,6 +68,7 @@ class SnowflakeEngineAdapter(GetCurrentCatalogFromFunctionMixin, ClusteredByMixi
|
|
|
68
68
|
},
|
|
69
69
|
)
|
|
70
70
|
MANAGED_TABLE_KIND = "DYNAMIC TABLE"
|
|
71
|
+
SNOWPARK = "snowpark"
|
|
71
72
|
|
|
72
73
|
@contextlib.contextmanager
|
|
73
74
|
def session(self, properties: SessionProperties) -> t.Iterator[None]:
|
|
@@ -104,9 +105,16 @@ class SnowflakeEngineAdapter(GetCurrentCatalogFromFunctionMixin, ClusteredByMixi
|
|
|
104
105
|
@property
|
|
105
106
|
def snowpark(self) -> t.Optional[SnowparkSession]:
|
|
106
107
|
if snowpark:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
if not self._connection_pool.get_attribute(self.SNOWPARK):
|
|
109
|
+
# Snowpark sessions are not thread safe so we create a session per thread to prevent them from interfering with each other
|
|
110
|
+
# The sessions are cleaned up when close() is called
|
|
111
|
+
new_session = snowpark.Session.builder.configs(
|
|
112
|
+
{"connection": self._connection_pool.get()}
|
|
113
|
+
).create()
|
|
114
|
+
self._connection_pool.set_attribute(self.SNOWPARK, new_session)
|
|
115
|
+
|
|
116
|
+
return self._connection_pool.get_attribute(self.SNOWPARK)
|
|
117
|
+
|
|
110
118
|
return None
|
|
111
119
|
|
|
112
120
|
@property
|
|
@@ -584,3 +592,10 @@ class SnowflakeEngineAdapter(GetCurrentCatalogFromFunctionMixin, ClusteredByMixi
|
|
|
584
592
|
return columns_to_types_from_dtypes(query_or_df.sample(n=1).to_pandas().dtypes.items())
|
|
585
593
|
|
|
586
594
|
return super()._columns_to_types(query_or_df, columns_to_types)
|
|
595
|
+
|
|
596
|
+
def close(self) -> t.Any:
|
|
597
|
+
if snowpark_session := self._connection_pool.get_attribute(self.SNOWPARK):
|
|
598
|
+
snowpark_session.close() # type: ignore
|
|
599
|
+
self._connection_pool.set_attribute(self.SNOWPARK, None)
|
|
600
|
+
|
|
601
|
+
return super().close()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=jFzBB3tos-4Z7mIfsDO0P_7HdqxK3J2sRk8mGivtBkI,530
|
|
3
3
|
sqlmesh/magics.py,sha256=aeOyTdeNnyGzGtJXECDAbqJ8OAplrV4UAYl0I2hhtig,39670
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -72,7 +72,7 @@ sqlmesh/core/engine_adapter/postgres.py,sha256=XWnV7MDndkCRokb7ih2yxXodw4W8E61yH
|
|
|
72
72
|
sqlmesh/core/engine_adapter/redshift.py,sha256=_rZWv4rchDAzB6m6idoV1NLHFBKK_gM4nlfeErqXEcE,16691
|
|
73
73
|
sqlmesh/core/engine_adapter/risingwave.py,sha256=NXXuiPfbB5ZSp7igMqZpaX2c-5TYreOlIouPU7iCVJ8,936
|
|
74
74
|
sqlmesh/core/engine_adapter/shared.py,sha256=NyF2osSJDWPp7KlJUBR4GZcS_cJFr4daUPvhGyp4XcQ,12909
|
|
75
|
-
sqlmesh/core/engine_adapter/snowflake.py,sha256=
|
|
75
|
+
sqlmesh/core/engine_adapter/snowflake.py,sha256=gxZWDOY12itwVWF6anqyZI6bXnaK2wY3Uca0qnH5ffk,27142
|
|
76
76
|
sqlmesh/core/engine_adapter/spark.py,sha256=nDJXH1su08wv3m9X0Mz-x98xhZblq1BvM3EtRYjZhrI,21012
|
|
77
77
|
sqlmesh/core/engine_adapter/trino.py,sha256=pZ2E1owyC6DPmkU3RkibR3CIE1gE-8fNd016YHh52II,14915
|
|
78
78
|
sqlmesh/core/linter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -267,7 +267,7 @@ sqlmesh/utils/pandas.py,sha256=uKI-ygEtMcGDRzXdBu0RkGmMBkYxwu5O2Wabho841Ls,2196
|
|
|
267
267
|
sqlmesh/utils/pydantic.py,sha256=-u69PDY-4FLR7ODNKBoN7PsPNmZ0wdhsJcCAG2P6vyY,11061
|
|
268
268
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
269
269
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
270
|
-
sqlmesh-0.184.3.
|
|
270
|
+
sqlmesh-0.184.3.dev10.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
271
271
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
272
272
|
web/client/dist/index.html,sha256=h-jIuvBTQ-QurWEds39umXiJjP_TWPQmkHTiizCAeOI,5472
|
|
273
273
|
web/client/dist/assets/Audits-DIPZFtrx.js,sha256=Yn24xPBT3znH0fQJJaBLb1p1wjJz1nWjrZcm18e63W0,1041
|
|
@@ -385,8 +385,8 @@ web/server/api/endpoints/models.py,sha256=SzS5bshzdXyM6hb948sZ_3k-xhpGCHkxkb7pHz
|
|
|
385
385
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
386
386
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
387
387
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
388
|
-
sqlmesh-0.184.3.
|
|
389
|
-
sqlmesh-0.184.3.
|
|
390
|
-
sqlmesh-0.184.3.
|
|
391
|
-
sqlmesh-0.184.3.
|
|
392
|
-
sqlmesh-0.184.3.
|
|
388
|
+
sqlmesh-0.184.3.dev10.dist-info/METADATA,sha256=Vsg4xUkm0XISAr4Mr31UoAvyqBR3PxXLiyT9p-TNg-I,25499
|
|
389
|
+
sqlmesh-0.184.3.dev10.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
390
|
+
sqlmesh-0.184.3.dev10.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
391
|
+
sqlmesh-0.184.3.dev10.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
392
|
+
sqlmesh-0.184.3.dev10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|