sqlmesh 0.211.2.dev4__py3-none-any.whl → 0.211.3.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.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/macros.py +0 -17
- sqlmesh/dbt/model.py +5 -1
- {sqlmesh-0.211.2.dev4.dist-info → sqlmesh-0.211.3.dev2.dist-info}/METADATA +1 -1
- {sqlmesh-0.211.2.dev4.dist-info → sqlmesh-0.211.3.dev2.dist-info}/RECORD +9 -9
- {sqlmesh-0.211.2.dev4.dist-info → sqlmesh-0.211.3.dev2.dist-info}/WHEEL +0 -0
- {sqlmesh-0.211.2.dev4.dist-info → sqlmesh-0.211.3.dev2.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.211.2.dev4.dist-info → sqlmesh-0.211.3.dev2.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.211.2.dev4.dist-info → sqlmesh-0.211.3.dev2.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.211.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 211,
|
|
31
|
+
__version__ = version = '0.211.3.dev2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 211, 3, 'dev2')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
sqlmesh/core/macros.py
CHANGED
|
@@ -12,7 +12,6 @@ from string import Template
|
|
|
12
12
|
from datetime import datetime, date
|
|
13
13
|
|
|
14
14
|
import sqlglot
|
|
15
|
-
from jinja2 import Environment
|
|
16
15
|
from sqlglot import Generator, exp, parse_one
|
|
17
16
|
from sqlglot.executor.env import ENV
|
|
18
17
|
from sqlglot.executor.python import Python
|
|
@@ -40,7 +39,6 @@ from sqlmesh.utils import (
|
|
|
40
39
|
)
|
|
41
40
|
from sqlmesh.utils.date import DatetimeRanges, to_datetime, to_date
|
|
42
41
|
from sqlmesh.utils.errors import MacroEvalError, SQLMeshError
|
|
43
|
-
from sqlmesh.utils.jinja import JinjaMacroRegistry, has_jinja
|
|
44
42
|
from sqlmesh.utils.metaprogramming import (
|
|
45
43
|
Executable,
|
|
46
44
|
SqlValue,
|
|
@@ -193,7 +191,6 @@ class MacroEvaluator:
|
|
|
193
191
|
self.columns_to_types_called = False
|
|
194
192
|
self.default_catalog = default_catalog
|
|
195
193
|
|
|
196
|
-
self._jinja_env: t.Optional[Environment] = None
|
|
197
194
|
self._schema = schema
|
|
198
195
|
self._resolve_table = resolve_table
|
|
199
196
|
self._resolve_tables = resolve_tables
|
|
@@ -282,12 +279,6 @@ class MacroEvaluator:
|
|
|
282
279
|
if node.this != text:
|
|
283
280
|
changed = True
|
|
284
281
|
return exp.to_identifier(text, quoted=node.quoted or None)
|
|
285
|
-
if node.is_string:
|
|
286
|
-
text = node.this
|
|
287
|
-
if has_jinja(text):
|
|
288
|
-
changed = True
|
|
289
|
-
node.set("this", self.jinja_env.from_string(node.this).render())
|
|
290
|
-
return node
|
|
291
282
|
if isinstance(node, MacroFunc):
|
|
292
283
|
changed = True
|
|
293
284
|
return self.evaluate(node)
|
|
@@ -436,14 +427,6 @@ class MacroEvaluator:
|
|
|
436
427
|
"""
|
|
437
428
|
return sqlglot.maybe_parse(sql, dialect=self.dialect, into=into, **opts)
|
|
438
429
|
|
|
439
|
-
@property
|
|
440
|
-
def jinja_env(self) -> Environment:
|
|
441
|
-
if not self._jinja_env:
|
|
442
|
-
jinja_env_methods = {**self.locals, **self.env}
|
|
443
|
-
del jinja_env_methods["self"]
|
|
444
|
-
self._jinja_env = JinjaMacroRegistry().build_environment(**jinja_env_methods)
|
|
445
|
-
return self._jinja_env
|
|
446
|
-
|
|
447
430
|
def columns_to_types(self, model_name: TableName | exp.Column) -> t.Dict[str, exp.DataType]:
|
|
448
431
|
"""Returns the columns-to-types mapping corresponding to the specified model."""
|
|
449
432
|
|
sqlmesh/dbt/model.py
CHANGED
|
@@ -154,7 +154,11 @@ class ModelConfig(BaseModelConfig):
|
|
|
154
154
|
|
|
155
155
|
@field_validator("partition_by", mode="before")
|
|
156
156
|
@classmethod
|
|
157
|
-
def _validate_partition_by(
|
|
157
|
+
def _validate_partition_by(
|
|
158
|
+
cls, v: t.Any
|
|
159
|
+
) -> t.Optional[t.Union[t.List[str], t.Dict[str, t.Any]]]:
|
|
160
|
+
if v is None:
|
|
161
|
+
return None
|
|
158
162
|
if isinstance(v, str):
|
|
159
163
|
return [v]
|
|
160
164
|
if isinstance(v, list):
|
|
@@ -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=hNFZJqAm9RSiTCK7GOxVuiAEOsg0wbLlsxt2AmaEsoY,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
|
|
@@ -19,7 +19,7 @@ sqlmesh/core/dialect.py,sha256=s5r3oy43C1eUa3v3pXgQN4xChczRVpjZvANAl3WHGlE,52922
|
|
|
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=WDceZAqm2ijcZHlEnG1old7p5c9LKvkr4YpbPZ-7hk4,41349
|
|
22
|
-
sqlmesh/core/macros.py,sha256=
|
|
22
|
+
sqlmesh/core/macros.py,sha256=VCNj5n9PNtakD5gP1wC9bFyYUP0MzL99kDGLZUfwP-w,62316
|
|
23
23
|
sqlmesh/core/node.py,sha256=3ChBz1PIMJhp-jzed_GLBrtmEF2v_BVDEM5WNe0ssPk,14658
|
|
24
24
|
sqlmesh/core/notification_target.py,sha256=PPGoDrgbRKxr27vJEu03XqNTQLYTw0ZF_b0yAapxGeI,16158
|
|
25
25
|
sqlmesh/core/reference.py,sha256=k7OSkLqTjPR8WJjNeFj0xAJ297nZUMgb_iTVwKRRKjc,4875
|
|
@@ -134,7 +134,7 @@ sqlmesh/dbt/common.py,sha256=q77xwKSSuRqcdqbYRwpwcbAqK0ODeqcho1NCxRs_aDA,8001
|
|
|
134
134
|
sqlmesh/dbt/context.py,sha256=H3DR3-dyRaV3-Py2WaMnyD3VWXTQZRh_BerguBshImk,10482
|
|
135
135
|
sqlmesh/dbt/loader.py,sha256=GlP4BFKjqLpVMcMExiAp1nVJbTWu5LNqNUxVZraWslQ,16034
|
|
136
136
|
sqlmesh/dbt/manifest.py,sha256=GDPNR4e7fgCuQFoX7cqjiGH6fw-30w0gUBCZaNRek-w,27711
|
|
137
|
-
sqlmesh/dbt/model.py,sha256=
|
|
137
|
+
sqlmesh/dbt/model.py,sha256=xAxBCzYFj_mbzrr0IHp4IljOH0FVqIsMqAbDcJAypQo,27030
|
|
138
138
|
sqlmesh/dbt/package.py,sha256=IBBQueVB4_4C9tIk0-GUL-O2uibNxXu6W2a4AeHHcOU,4322
|
|
139
139
|
sqlmesh/dbt/profile.py,sha256=hAqL8lfT98pSBY-wCInPg2WhFEjCNUGF2bx5UcWFx-4,3939
|
|
140
140
|
sqlmesh/dbt/project.py,sha256=su_WHBq94WnjFe5of2Bl6mV9RebVWDnNcjmLw2Ou0so,4280
|
|
@@ -294,7 +294,7 @@ sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,120
|
|
|
294
294
|
sqlmesh/utils/rich.py,sha256=cwQ5nJ6sgz64xHtoh6_ec7ReV5YpsOGhMtUJnwoRfEI,3549
|
|
295
295
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
296
296
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
297
|
-
sqlmesh-0.211.
|
|
297
|
+
sqlmesh-0.211.3.dev2.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
298
298
|
sqlmesh_dbt/__init__.py,sha256=awYS5y5mz-1NUmx6i5h5NSTJ7tidRl9NC0FAnFWSF6U,350
|
|
299
299
|
sqlmesh_dbt/cli.py,sha256=wSShIx02GCYz0Ciq808GbbO9tjXYkaM6U6SFoT7rmpA,4117
|
|
300
300
|
sqlmesh_dbt/console.py,sha256=80sCEbrKfR5f3SvxIyI7hw_SuiDiiUwuJYxXbQO2014,830
|
|
@@ -419,8 +419,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
419
419
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
420
420
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
421
421
|
web/server/api/endpoints/table_diff.py,sha256=8XTwgOh6QBbNy_hTM1JuHgRjbnie-pGPrphiW-FNLjQ,6058
|
|
422
|
-
sqlmesh-0.211.
|
|
423
|
-
sqlmesh-0.211.
|
|
424
|
-
sqlmesh-0.211.
|
|
425
|
-
sqlmesh-0.211.
|
|
426
|
-
sqlmesh-0.211.
|
|
422
|
+
sqlmesh-0.211.3.dev2.dist-info/METADATA,sha256=1JxbNVPaAAKo2JhZhELwiaWGKpOcNosCR8atAqrT4z8,26773
|
|
423
|
+
sqlmesh-0.211.3.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
424
|
+
sqlmesh-0.211.3.dev2.dist-info/entry_points.txt,sha256=sHAf6tQczIM8xZoduN4qaUjV7QEPVUUW_LCT8EDUMv4,155
|
|
425
|
+
sqlmesh-0.211.3.dev2.dist-info/top_level.txt,sha256=RQ-33FPe2IgL0rgossAfJkCRtqslz9b7wFARqiWLC5Q,24
|
|
426
|
+
sqlmesh-0.211.3.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|