sqlmesh 0.186.2.dev8__py3-none-any.whl → 0.186.2.dev9__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/context.py +14 -6
- {sqlmesh-0.186.2.dev8.dist-info → sqlmesh-0.186.2.dev9.dist-info}/METADATA +1 -1
- {sqlmesh-0.186.2.dev8.dist-info → sqlmesh-0.186.2.dev9.dist-info}/RECORD +8 -8
- {sqlmesh-0.186.2.dev8.dist-info → sqlmesh-0.186.2.dev9.dist-info}/WHEEL +0 -0
- {sqlmesh-0.186.2.dev8.dist-info → sqlmesh-0.186.2.dev9.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.186.2.dev8.dist-info → sqlmesh-0.186.2.dev9.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.186.2.dev8.dist-info → sqlmesh-0.186.2.dev9.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.186.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 186, 2, '
|
|
20
|
+
__version__ = version = '0.186.2.dev9'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 186, 2, 'dev9')
|
sqlmesh/core/context.py
CHANGED
|
@@ -869,7 +869,12 @@ class GenericContext(BaseContext, t.Generic[C]):
|
|
|
869
869
|
Returns:
|
|
870
870
|
The expected model.
|
|
871
871
|
"""
|
|
872
|
-
if isinstance(model_or_snapshot,
|
|
872
|
+
if isinstance(model_or_snapshot, Snapshot):
|
|
873
|
+
return model_or_snapshot.model
|
|
874
|
+
if not isinstance(model_or_snapshot, str):
|
|
875
|
+
return model_or_snapshot
|
|
876
|
+
|
|
877
|
+
try:
|
|
873
878
|
# We should try all dialects referenced in the project for cases when models use mixed dialects.
|
|
874
879
|
for dialect in self._all_dialects:
|
|
875
880
|
normalized_name = normalize_model_name(
|
|
@@ -879,13 +884,16 @@ class GenericContext(BaseContext, t.Generic[C]):
|
|
|
879
884
|
)
|
|
880
885
|
if normalized_name in self._models:
|
|
881
886
|
return self._models[normalized_name]
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
else:
|
|
885
|
-
return model_or_snapshot
|
|
887
|
+
except:
|
|
888
|
+
pass
|
|
886
889
|
|
|
887
890
|
if raise_if_missing:
|
|
888
|
-
|
|
891
|
+
if model_or_snapshot.endswith((".sql", ".py")):
|
|
892
|
+
msg = "Resolving models by path is not supported, please pass in the model name instead."
|
|
893
|
+
else:
|
|
894
|
+
msg = f"Cannot find model with name '{model_or_snapshot}'"
|
|
895
|
+
|
|
896
|
+
raise SQLMeshError(msg)
|
|
889
897
|
|
|
890
898
|
return None
|
|
891
899
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=69xw6bTmi4cW90M-sl3g6wLDgxVcLHcKg1q8GS3lqyA,7466
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=jeZrRJAjsFoG4AdF0QDMWkYzRJePsaNf_KOlplTcdlg,528
|
|
3
3
|
sqlmesh/magics.py,sha256=JHorAZNtezf123jmTyNSoUC9yHmv-08hMP205PJmmIo,39750
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -13,7 +13,7 @@ sqlmesh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
13
13
|
sqlmesh/core/_typing.py,sha256=e1f7xO2aZCy38M_3VoDy-XI3shyd99-IFctgIFSgXWM,497
|
|
14
14
|
sqlmesh/core/console.py,sha256=ZAaGLOWBJGBxPzLV7KZZ9akPExgD5m5AboCM8O0Q0nY,150944
|
|
15
15
|
sqlmesh/core/constants.py,sha256=oqt6zjepUhQoWlgapKn_HpG7Pu9mrFwepdX5caNfJUI,2499
|
|
16
|
-
sqlmesh/core/context.py,sha256=
|
|
16
|
+
sqlmesh/core/context.py,sha256=paXJMdaydEQ9Tp80fVUnxveBlbCN7kGGEvesqAiezmw,115276
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=s9toP17d4tJfOpFH91LcjGK2CM64PVuB0MPkeFgF4hQ,20415
|
|
18
18
|
sqlmesh/core/dialect.py,sha256=fPTV517IOS0nWMxYznNNQnXkQkFFrPOSKe8ghsQ0o8A,49759
|
|
19
19
|
sqlmesh/core/environment.py,sha256=0TTQf4C4LXwf37fm-dfYv1qyG7vtZfQI5rizgm5g0j0,11442
|
|
@@ -269,7 +269,7 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
269
269
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
270
270
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
271
271
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
272
|
-
sqlmesh-0.186.2.
|
|
272
|
+
sqlmesh-0.186.2.dev9.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
273
273
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
274
274
|
web/client/dist/index.html,sha256=M50OuwjW63dRCS0Dz40Yecgvw9ecLFqizbTa6gv5Nd4,5472
|
|
275
275
|
web/client/dist/assets/Audits-BPlxzqeG.js,sha256=TCx1qCjCGgmUSvH6HoPr5t8ztbRXMlOxrcW4o7hRjlA,1041
|
|
@@ -387,8 +387,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
387
387
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
388
388
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
389
389
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
390
|
-
sqlmesh-0.186.2.
|
|
391
|
-
sqlmesh-0.186.2.
|
|
392
|
-
sqlmesh-0.186.2.
|
|
393
|
-
sqlmesh-0.186.2.
|
|
394
|
-
sqlmesh-0.186.2.
|
|
390
|
+
sqlmesh-0.186.2.dev9.dist-info/METADATA,sha256=ET7j4M3y_JZuXPTtTlqkQBtcu_hxq7lONYrg4_PupLQ,25523
|
|
391
|
+
sqlmesh-0.186.2.dev9.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
392
|
+
sqlmesh-0.186.2.dev9.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
393
|
+
sqlmesh-0.186.2.dev9.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
394
|
+
sqlmesh-0.186.2.dev9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|