sqlmesh 0.225.0__py3-none-any.whl → 0.227.2.dev6__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.
Potentially problematic release.
This version of sqlmesh might be problematic. Click here for more details.
- sqlmesh/__init__.py +10 -2
- sqlmesh/_version.py +2 -2
- sqlmesh/core/config/connection.py +10 -5
- sqlmesh/core/config/loader.py +1 -0
- sqlmesh/core/context.py +73 -8
- sqlmesh/core/engine_adapter/base.py +12 -7
- sqlmesh/core/engine_adapter/fabric.py +1 -2
- sqlmesh/core/engine_adapter/mssql.py +5 -2
- sqlmesh/core/engine_adapter/trino.py +1 -1
- sqlmesh/core/lineage.py +1 -0
- sqlmesh/core/linter/rules/builtin.py +15 -0
- sqlmesh/core/loader.py +4 -0
- sqlmesh/core/model/kind.py +2 -2
- sqlmesh/core/plan/definition.py +9 -7
- sqlmesh/core/renderer.py +7 -8
- sqlmesh/core/scheduler.py +45 -15
- sqlmesh/core/signal.py +35 -14
- sqlmesh/core/snapshot/definition.py +18 -12
- sqlmesh/core/snapshot/evaluator.py +31 -17
- sqlmesh/core/state_sync/db/snapshot.py +6 -1
- sqlmesh/core/table_diff.py +2 -2
- sqlmesh/core/test/definition.py +5 -3
- sqlmesh/core/test/discovery.py +4 -0
- sqlmesh/dbt/builtin.py +9 -11
- sqlmesh/dbt/column.py +17 -5
- sqlmesh/dbt/common.py +4 -2
- sqlmesh/dbt/context.py +2 -0
- sqlmesh/dbt/loader.py +15 -2
- sqlmesh/dbt/manifest.py +3 -1
- sqlmesh/dbt/model.py +13 -1
- sqlmesh/dbt/profile.py +3 -3
- sqlmesh/dbt/target.py +9 -4
- sqlmesh/utils/date.py +1 -1
- sqlmesh/utils/pydantic.py +6 -6
- sqlmesh/utils/windows.py +13 -3
- {sqlmesh-0.225.0.dist-info → sqlmesh-0.227.2.dev6.dist-info}/METADATA +2 -2
- {sqlmesh-0.225.0.dist-info → sqlmesh-0.227.2.dev6.dist-info}/RECORD +43 -43
- sqlmesh_dbt/cli.py +26 -1
- sqlmesh_dbt/operations.py +8 -2
- {sqlmesh-0.225.0.dist-info → sqlmesh-0.227.2.dev6.dist-info}/WHEEL +0 -0
- {sqlmesh-0.225.0.dist-info → sqlmesh-0.227.2.dev6.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.225.0.dist-info → sqlmesh-0.227.2.dev6.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.225.0.dist-info → sqlmesh-0.227.2.dev6.dist-info}/top_level.txt +0 -0
sqlmesh/dbt/target.py
CHANGED
|
@@ -601,12 +601,17 @@ class BigQueryConfig(TargetConfig):
|
|
|
601
601
|
if not isinstance(data, dict):
|
|
602
602
|
return data
|
|
603
603
|
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
# dbt treats schema and dataset interchangeably
|
|
605
|
+
schema = data.get("schema") or data.get("dataset")
|
|
606
|
+
if not schema:
|
|
606
607
|
raise ConfigError("Either schema or dataset must be set")
|
|
607
|
-
data["
|
|
608
|
-
|
|
608
|
+
data["dataset"] = data["schema"] = schema
|
|
609
|
+
|
|
610
|
+
# dbt treats database and project interchangeably
|
|
611
|
+
database = data.get("database") or data.get("project")
|
|
612
|
+
if not database:
|
|
609
613
|
raise ConfigError("Either database or project must be set")
|
|
614
|
+
data["database"] = data["project"] = database
|
|
610
615
|
|
|
611
616
|
return data
|
|
612
617
|
|
sqlmesh/utils/date.py
CHANGED
|
@@ -444,7 +444,7 @@ def to_time_column(
|
|
|
444
444
|
|
|
445
445
|
|
|
446
446
|
def pandas_timestamp_to_pydatetime(
|
|
447
|
-
df: pd.DataFrame, columns_to_types: t.Optional[t.Dict[str, exp.DataType]]
|
|
447
|
+
df: pd.DataFrame, columns_to_types: t.Optional[t.Dict[str, exp.DataType]] = None
|
|
448
448
|
) -> pd.DataFrame:
|
|
449
449
|
import pandas as pd
|
|
450
450
|
from pandas.api.types import is_datetime64_any_dtype # type: ignore
|
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)]
|
sqlmesh/utils/windows.py
CHANGED
|
@@ -3,12 +3,22 @@ from pathlib import Path
|
|
|
3
3
|
|
|
4
4
|
IS_WINDOWS = platform.system() == "Windows"
|
|
5
5
|
|
|
6
|
+
WINDOWS_LONGPATH_PREFIX = "\\\\?\\"
|
|
7
|
+
|
|
6
8
|
|
|
7
9
|
def fix_windows_path(path: Path) -> Path:
|
|
8
10
|
"""
|
|
9
11
|
Windows paths are limited to 260 characters: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
|
|
10
12
|
Users can change this by updating a registry entry but we cant rely on that.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
SQLMesh quite commonly generates cache file paths that exceed 260 characters and thus cause a FileNotFound error.
|
|
15
|
+
If we prefix paths with "\\?\" then we can have paths up to 32,767 characters.
|
|
16
|
+
|
|
17
|
+
Note that this prefix also means that relative paths no longer work. From the above docs:
|
|
18
|
+
> Because you cannot use the "\\?\" prefix with a relative path, relative paths are always limited to a total of MAX_PATH characters.
|
|
19
|
+
|
|
20
|
+
So we also call path.resolve() to resolve the relative sections so that operations like `path.read_text()` continue to work
|
|
13
21
|
"""
|
|
14
|
-
|
|
22
|
+
if path.parts and not path.parts[0].startswith(WINDOWS_LONGPATH_PREFIX):
|
|
23
|
+
path = Path(WINDOWS_LONGPATH_PREFIX + str(path.absolute()))
|
|
24
|
+
return path.resolve()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlmesh
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.227.2.dev6
|
|
4
4
|
Summary: Next-generation data transformation framework
|
|
5
5
|
Author-email: "TobikoData Inc." <engineering@tobikodata.com>
|
|
6
6
|
License: Apache License
|
|
@@ -235,7 +235,7 @@ Requires-Dist: python-dotenv
|
|
|
235
235
|
Requires-Dist: requests
|
|
236
236
|
Requires-Dist: rich[jupyter]
|
|
237
237
|
Requires-Dist: ruamel.yaml
|
|
238
|
-
Requires-Dist: sqlglot[rs]~=27.
|
|
238
|
+
Requires-Dist: sqlglot[rs]~=27.28.0
|
|
239
239
|
Requires-Dist: tenacity
|
|
240
240
|
Requires-Dist: time-machine
|
|
241
241
|
Requires-Dist: json-stream
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
sqlmesh/__init__.py,sha256=
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
1
|
+
sqlmesh/__init__.py,sha256=v_spqQEhcnGaahp1yPvMqUIa6mhH3cs3Bc1CznxvCEA,7965
|
|
2
|
+
sqlmesh/_version.py,sha256=YAFaI4FGLTdonGqqV9W5lAFyj9t7owRNsu0qHTS5QAc,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
|
|
@@ -13,24 +13,24 @@ sqlmesh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
13
13
|
sqlmesh/core/_typing.py,sha256=PzXxMYnORq18JhblAOUttms3zPJZzZpIbfFA_jgKYPA,498
|
|
14
14
|
sqlmesh/core/console.py,sha256=MYpVlciUY6rUuoqXyKfXTxD6a4-Bw4-ooATUTj_VHGg,172830
|
|
15
15
|
sqlmesh/core/constants.py,sha256=BuQk43vluUm7LfP9nKp5o9qRhqIenWF_LiLXO_t_53c,2699
|
|
16
|
-
sqlmesh/core/context.py,sha256=
|
|
16
|
+
sqlmesh/core/context.py,sha256=PZcI06NldePYMDkvsMuZf8vGreDk7dzjnzX5rZ422AM,133656
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=mxkJu0IthFMOlaQ_kcq5C09mlgkq2RQb-pG2rd-x_nA,21648
|
|
18
18
|
sqlmesh/core/dialect.py,sha256=CnKcPj6BnREfu9Zn1OyS7hZ3ktnaX03ygOg91nADlTU,53029
|
|
19
19
|
sqlmesh/core/environment.py,sha256=Kgs_gUEUI072mh0JJFWNRynrCxp1TzRHZhX_NWJRfXc,13142
|
|
20
20
|
sqlmesh/core/janitor.py,sha256=zJRN48ENjKexeiqa1Kmwyj_HsEEEIAa8hsFD8gTCmfg,7194
|
|
21
|
-
sqlmesh/core/lineage.py,sha256=
|
|
22
|
-
sqlmesh/core/loader.py,sha256=
|
|
21
|
+
sqlmesh/core/lineage.py,sha256=LtiOztX1xIbFfWz-eb5dPZW4B0o2sI942_IM4YDbsso,3163
|
|
22
|
+
sqlmesh/core/loader.py,sha256=sXGTeyDISd3Gtu9Ej9iEz1CMM4SXSwZMSBpbZNohE10,37458
|
|
23
23
|
sqlmesh/core/macros.py,sha256=rkklwVnUEmEro4wpdel289mKhaS3x5_SPZrkYZt3Q9E,63173
|
|
24
24
|
sqlmesh/core/node.py,sha256=2ejDwH1whl_ic1CRzX16Be-FQrosAf8pdyWb7oPzU6M,19895
|
|
25
25
|
sqlmesh/core/notification_target.py,sha256=PPGoDrgbRKxr27vJEu03XqNTQLYTw0ZF_b0yAapxGeI,16158
|
|
26
26
|
sqlmesh/core/reference.py,sha256=k7OSkLqTjPR8WJjNeFj0xAJ297nZUMgb_iTVwKRRKjc,4875
|
|
27
|
-
sqlmesh/core/renderer.py,sha256=
|
|
28
|
-
sqlmesh/core/scheduler.py,sha256=
|
|
27
|
+
sqlmesh/core/renderer.py,sha256=z1WbRaNnBUZAWqc5gYurIgd4LocKQOexdjKQ0hhbLfE,28854
|
|
28
|
+
sqlmesh/core/scheduler.py,sha256=seYDDtowupyyK_xgjqDLZ5CACyktKCojmAjj97Tg0ts,50629
|
|
29
29
|
sqlmesh/core/schema_diff.py,sha256=qM4uxOBtrAqx8_5JU0ERicMT-byLD4xUUv4FrQw92js,33934
|
|
30
30
|
sqlmesh/core/schema_loader.py,sha256=_Pq2RSw91uthqv1vNi_eHmLlzhtGz_APMJ0wAJZYuvk,3677
|
|
31
31
|
sqlmesh/core/selector.py,sha256=gb8NpDXO-yxzxAB4Rl5yRkirWZyouV9V9d9AC1Lfzjg,18030
|
|
32
|
-
sqlmesh/core/signal.py,sha256=
|
|
33
|
-
sqlmesh/core/table_diff.py,sha256=
|
|
32
|
+
sqlmesh/core/signal.py,sha256=RPyQNSCLyr2sybRK3wj6iWwukpwF-R0w9divnPwjJlM,3692
|
|
33
|
+
sqlmesh/core/table_diff.py,sha256=oKLVaBs5HhpWFQUHimcNB4jDPvFJCCM360N3yQqle5g,28872
|
|
34
34
|
sqlmesh/core/user.py,sha256=EJ6R4R1iK67n80vBoCCsidF56IR7xEYqiCEO-nrVMso,1660
|
|
35
35
|
sqlmesh/core/analytics/__init__.py,sha256=ou3ZXAJfQOXEifj-PzaXwMDSvJzsVaqaMkUopiI00kM,3247
|
|
36
36
|
sqlmesh/core/analytics/collector.py,sha256=sggJvER16Jrg5triTC27E2KwaQvfkVDv4D6R1lVPH5I,13058
|
|
@@ -42,13 +42,13 @@ sqlmesh/core/config/__init__.py,sha256=tnEakbd8FAgSLYmjzuYAAgHIpJ00lwMKAhD_Cfs2O
|
|
|
42
42
|
sqlmesh/core/config/base.py,sha256=t8NQmsgQoZSc-k0dlDiCb8t1jj0AMYdGZ-6se9q_Pks,4898
|
|
43
43
|
sqlmesh/core/config/categorizer.py,sha256=6vzUoNLjR6GOEb_2mYVz2TwmMv2BfldgHX2u-Le5HZs,1975
|
|
44
44
|
sqlmesh/core/config/common.py,sha256=9V6PltBAjYeWLOU5dAbqL55BSFfpg8z8t2Op1x_PLhU,6418
|
|
45
|
-
sqlmesh/core/config/connection.py,sha256=
|
|
45
|
+
sqlmesh/core/config/connection.py,sha256=My5gcfT4PoNE1HGELG2TLfAgS7K2QanPnJE9TaNTa7Y,90999
|
|
46
46
|
sqlmesh/core/config/dbt.py,sha256=xSQ4NEVWhZj_aRYpyy4MWcRJ8Qa0o28w2ZBLI4bs3_I,468
|
|
47
47
|
sqlmesh/core/config/format.py,sha256=6CXFbvnor56xbldKE-Vrm9k_ABRoY4v6vgIb3mCihiQ,1355
|
|
48
48
|
sqlmesh/core/config/gateway.py,sha256=tYngyqwd_4Qr9lhcv2hlvLvb_2pgYYtKu6hdGsTr-4I,1931
|
|
49
49
|
sqlmesh/core/config/janitor.py,sha256=jxZWSNZMhNjJR9lWI00rDe2nr_5AOxkKE52Fo5nbq_U,901
|
|
50
50
|
sqlmesh/core/config/linter.py,sha256=4Fh6UgY5FrRD9tk_R41Y-M_r91Wh7EQW3Pc1IdRN9Cg,1287
|
|
51
|
-
sqlmesh/core/config/loader.py,sha256=
|
|
51
|
+
sqlmesh/core/config/loader.py,sha256=p26Ux_-ekgXtOHuqSMObDGfnAfb8Ou3Rug95mZ_uiOg,10167
|
|
52
52
|
sqlmesh/core/config/migration.py,sha256=3lZIlmIcQH3_hIEm3Y3jFtvpw0YXzRzAnk4OdiklO6M,408
|
|
53
53
|
sqlmesh/core/config/model.py,sha256=NgqyIq7J5DCGhIo9I_htiWjTycydVRlchG5McZuHSd0,4627
|
|
54
54
|
sqlmesh/core/config/naming.py,sha256=KVGaxUgswoQajXR_cHFJvgkmEFcU1V182GkOH1SJxuE,326
|
|
@@ -60,15 +60,15 @@ 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=t6c8HlWLmN_2GaWA3EV85Sq29al3fZpesE7Nr7iSDIw,129989
|
|
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
|
|
67
67
|
sqlmesh/core/engine_adapter/databricks.py,sha256=452Og5LriNtvXk0DElUGmoR_pUFQvBgNZchpprTIJxA,15846
|
|
68
68
|
sqlmesh/core/engine_adapter/duckdb.py,sha256=9AXeRhaYXBcYSmIavyFY9LUzfgh94qkTO98v0-suQ8I,7993
|
|
69
|
-
sqlmesh/core/engine_adapter/fabric.py,sha256=
|
|
69
|
+
sqlmesh/core/engine_adapter/fabric.py,sha256=wky02p3UVu0FvEZwqqb5XBW--XCc1JLMLrvY6TVqCdM,14172
|
|
70
70
|
sqlmesh/core/engine_adapter/mixins.py,sha256=3rB7B2PZSB920BODO7k_kKqu6z0N-zj1etiRCYzpUcQ,27096
|
|
71
|
-
sqlmesh/core/engine_adapter/mssql.py,sha256=
|
|
71
|
+
sqlmesh/core/engine_adapter/mssql.py,sha256=pqh6D_7eAeVCH6K4-81HPcNTLEPhTM_-Mou0QWBTOfA,18898
|
|
72
72
|
sqlmesh/core/engine_adapter/mysql.py,sha256=anKxdklYY2kiuxaHsC7FPN-LKzo7BP0Hy6hinA_c5Hg,6953
|
|
73
73
|
sqlmesh/core/engine_adapter/postgres.py,sha256=W3GXlA1qjTp6t9Az9w1bGJL28ahwes82gjhliYfo0tw,5417
|
|
74
74
|
sqlmesh/core/engine_adapter/redshift.py,sha256=DrBQbBpDwLKf4ARygBO3ldicAJs2n_BBWkGIHH8-CBM,17778
|
|
@@ -76,13 +76,13 @@ 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
|
|
83
83
|
sqlmesh/core/linter/rule.py,sha256=nB3o1rHyN44ZOg5ImICP16SeUHimf-12ObdXJjkTGyM,3964
|
|
84
84
|
sqlmesh/core/linter/rules/__init__.py,sha256=gevzfb67vFqckTCoVAe_TBGf6hQ-YtE1_YuGuXyh1L0,77
|
|
85
|
-
sqlmesh/core/linter/rules/builtin.py,sha256=
|
|
85
|
+
sqlmesh/core/linter/rules/builtin.py,sha256=mJjRrL97mTyqPgrUGk-1Ceml6ATCxElZVgiwi6WFqmU,11727
|
|
86
86
|
sqlmesh/core/metric/__init__.py,sha256=H1HmoD5IwN4YWe9iJXyueLYNmTQFZwok5nSWNJcZIBQ,237
|
|
87
87
|
sqlmesh/core/metric/definition.py,sha256=Yd5aVgsZCDPJ43aGP7WqtzZOuuSUtB8uJGVA6Jw9x9M,7201
|
|
88
88
|
sqlmesh/core/metric/rewriter.py,sha256=GiSTHfn2kinqCfNPYgZPRk93JFLzVaaejHtHDQ0yXZI,7326
|
|
@@ -91,22 +91,22 @@ 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
|
|
98
98
|
sqlmesh/core/plan/__init__.py,sha256=NKSvM7ZBVjw9ho3J65M1wFvG3KURB8PJ0FHHLmtSF44,443
|
|
99
99
|
sqlmesh/core/plan/builder.py,sha256=naiEWF_x3vUpcVjzaif1HMsKPtJLvabdnB4WsCskdf8,44245
|
|
100
100
|
sqlmesh/core/plan/common.py,sha256=GEu7eXIfX7MM7d8-1znYlVnF1UbRZkBSDXLoMbjsieY,10716
|
|
101
|
-
sqlmesh/core/plan/definition.py,sha256=
|
|
101
|
+
sqlmesh/core/plan/definition.py,sha256=tfddMilgk4CZN2SljFotFlttsT9nBQ50kwiNDRonxXw,15282
|
|
102
102
|
sqlmesh/core/plan/evaluator.py,sha256=twO9cHznTNAtPNC4IZcw9uhCxGl2yIywfePfmJKkymE,21114
|
|
103
103
|
sqlmesh/core/plan/explainer.py,sha256=UITln7f4vxf6-nx7mV_IBbtIZ4f8ob4TyooqZMB9Pqg,15442
|
|
104
104
|
sqlmesh/core/plan/stages.py,sha256=-Ju9yRQlEFmQoDIsDH_RO0EHdOlRZUVtVT9ag1gzLns,27491
|
|
105
105
|
sqlmesh/core/snapshot/__init__.py,sha256=NUhvP-glftOWwxONK79Bud93yNQJv8ApBUjkV35RhMY,1465
|
|
106
106
|
sqlmesh/core/snapshot/cache.py,sha256=bgqCR2hyf6r2A_8QP1EnXFK25gDX37-Zg0YeMuETWxg,3934
|
|
107
107
|
sqlmesh/core/snapshot/categorizer.py,sha256=iNBEqK2KIyTAYURlB9KLfyKCpXN7vjxSqA7QjFa7e5c,2418
|
|
108
|
-
sqlmesh/core/snapshot/definition.py,sha256=
|
|
109
|
-
sqlmesh/core/snapshot/evaluator.py,sha256=
|
|
108
|
+
sqlmesh/core/snapshot/definition.py,sha256=ZjjeiFLglG6zOusjzgaKOWSr_X_77JlMmvHK0C8d6Ms,96692
|
|
109
|
+
sqlmesh/core/snapshot/evaluator.py,sha256=ALO9bfzU9TxtNr1AdMCpnM1iJ_TJmpZKOJyO4UghRKc,133153
|
|
110
110
|
sqlmesh/core/snapshot/execution_tracker.py,sha256=Ss1oYgH28Fy1mQ4HriX-luE9MG0eLdecrE1SssUveQI,3651
|
|
111
111
|
sqlmesh/core/state_sync/__init__.py,sha256=vcm3p_e0scP_ZxOs3XPKPG3uPsaxrK_4pnNj0QueDwQ,779
|
|
112
112
|
sqlmesh/core/state_sync/base.py,sha256=nK5tq5cIT5x5NrTaTurCRX18bSHnhSjEWG20tVqlkZc,19340
|
|
@@ -118,32 +118,32 @@ sqlmesh/core/state_sync/db/environment.py,sha256=Q1oOCJniZ75WpOG67fbehDVmzR4stJh
|
|
|
118
118
|
sqlmesh/core/state_sync/db/facade.py,sha256=O_Y1hcxhysBcFHfM8tJz1Pm0DZh3mXFz26tAEQX28g8,25720
|
|
119
119
|
sqlmesh/core/state_sync/db/interval.py,sha256=YuzGB7QAgKUcc9A5d4APmj8CtFXx9x0WYXgVwSKaRnc,18925
|
|
120
120
|
sqlmesh/core/state_sync/db/migrator.py,sha256=oPnj5f07c1ykuxzQX3YTSThjdyFDj1nUZ5ktwz_ksKE,18958
|
|
121
|
-
sqlmesh/core/state_sync/db/snapshot.py,sha256=
|
|
121
|
+
sqlmesh/core/state_sync/db/snapshot.py,sha256=NeFPCRF3pAgna5XVrUmNH1R_J5B36gDhjXjUMSlZKK0,29183
|
|
122
122
|
sqlmesh/core/state_sync/db/utils.py,sha256=8KjRmOjP5CLuSRkYBUE2k34V-UYB0iSyuO0rWBQ_5pY,4218
|
|
123
123
|
sqlmesh/core/state_sync/db/version.py,sha256=q5VDIIvY-585vTbvqPalU0N4qjG6RKs4gr8a51R-_UE,2257
|
|
124
124
|
sqlmesh/core/test/__init__.py,sha256=e83TJPwPRR_rAG29Y0OVbZb-5oWVBzz-_wrcd22Qk10,418
|
|
125
125
|
sqlmesh/core/test/context.py,sha256=-TjUrhM3WLtVPBgOMTkvRrnuZq7mT7BeIIyuCbrPePU,2332
|
|
126
|
-
sqlmesh/core/test/definition.py,sha256=
|
|
127
|
-
sqlmesh/core/test/discovery.py,sha256=
|
|
126
|
+
sqlmesh/core/test/definition.py,sha256=Lfflu-qgkqkI7T977F4h4X7c5Co7i3uBt5Efsi4XaZE,42219
|
|
127
|
+
sqlmesh/core/test/discovery.py,sha256=5duKXgH4Lms7rXhJ8tOLCmCtqHpv7c7a4VJf12VkGw8,1278
|
|
128
128
|
sqlmesh/core/test/result.py,sha256=6gOKEsERciHhcrw9TedtNr7g1ynTO7UwA5-PPrzvYuM,4564
|
|
129
129
|
sqlmesh/core/test/runner.py,sha256=8I-cL7Q9CggLvET_GPkrXB2YjlyCIHrvbFbbRDnSHRE,6169
|
|
130
130
|
sqlmesh/dbt/__init__.py,sha256=KUv-lW5sG9D2ceXAIzA4MLcjyhzq3E-7qJP4P_PH2EU,144
|
|
131
131
|
sqlmesh/dbt/adapter.py,sha256=z-tFIj3rpVvdBr3y8l40FU531-TQ5H2ctLmjwzMBxwk,21321
|
|
132
132
|
sqlmesh/dbt/basemodel.py,sha256=oUr_Em-TjQbpYZS5gtvMA65JRTdnZM46NO9MWvLBLzQ,14860
|
|
133
|
-
sqlmesh/dbt/builtin.py,sha256=
|
|
134
|
-
sqlmesh/dbt/column.py,sha256=
|
|
135
|
-
sqlmesh/dbt/common.py,sha256=
|
|
136
|
-
sqlmesh/dbt/context.py,sha256=
|
|
137
|
-
sqlmesh/dbt/loader.py,sha256=
|
|
138
|
-
sqlmesh/dbt/manifest.py,sha256=
|
|
139
|
-
sqlmesh/dbt/model.py,sha256=
|
|
133
|
+
sqlmesh/dbt/builtin.py,sha256=hJwLdVs3Qe_AFUIa0ZMnktblpdkGGaq20nFUJEf3B_I,19752
|
|
134
|
+
sqlmesh/dbt/column.py,sha256=T5xEWNf0n1sZ3REWnc5D9RsXt5VrrZ1YlMWZUUuAUxo,2449
|
|
135
|
+
sqlmesh/dbt/common.py,sha256=RmabUrj2A25G1vy7iV-15NJ481L5qHAQnq-JVNYEQr0,8653
|
|
136
|
+
sqlmesh/dbt/context.py,sha256=JDfSkVBBV2Xi4nDOwWipVHJRll3ioEmvh7gBglPVvqM,11074
|
|
137
|
+
sqlmesh/dbt/loader.py,sha256=ZTpPFnXuf4hQ8Z7Z6oMzxqN2wMMxsQqhm2x-8a5R1AA,19269
|
|
138
|
+
sqlmesh/dbt/manifest.py,sha256=uwXiXnhjoXVZeRa7eTp1eqUYrw_6VQNOqquozJy_FOo,34633
|
|
139
|
+
sqlmesh/dbt/model.py,sha256=RcQw3Dz2o4zC8vBYPCkMB8MKkn3MEUS6Ns3uQmACkeQ,35435
|
|
140
140
|
sqlmesh/dbt/package.py,sha256=8MOq_kHP2qjj24bpoC3GPnHlOVLYO4V9oVb9krk1Mdk,4759
|
|
141
|
-
sqlmesh/dbt/profile.py,sha256=
|
|
141
|
+
sqlmesh/dbt/profile.py,sha256=ilDiSqBqw6lsJLUu4MfJSrIkvtC3fbxlvawKn44lHjc,4009
|
|
142
142
|
sqlmesh/dbt/project.py,sha256=Dxf9JakvvQofhcRa2bSi5tFCU4eHMlyRt_Dd7vwOWQM,4712
|
|
143
143
|
sqlmesh/dbt/relation.py,sha256=8QhnW_mQ6bjhKNZwTI1p9SLdMBCcAxvHfo0Qs97Mw6w,228
|
|
144
144
|
sqlmesh/dbt/seed.py,sha256=4X2SDKNaJv4r91S2kpwgJKhOL6GoEpb8d0gRchrCKo0,4494
|
|
145
145
|
sqlmesh/dbt/source.py,sha256=TyXPH7YwuWhj6AXrPPqs1oWJ84C9BundoLzm3qxwAKY,4508
|
|
146
|
-
sqlmesh/dbt/target.py,sha256=
|
|
146
|
+
sqlmesh/dbt/target.py,sha256=0qtAExh1foZwvBJ7SmThR1uuazVW1RSpSwq8dw0fHYo,42284
|
|
147
147
|
sqlmesh/dbt/test.py,sha256=NzhoafbUaLS9hs6DqIYJKBl0YaUGJ2qNY2jGulz53t0,9446
|
|
148
148
|
sqlmesh/dbt/util.py,sha256=M-f5fJcdRMCkYnPR-UqnD-KciLe4uSw0U5OxzU8Lg28,906
|
|
149
149
|
sqlmesh/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -224,7 +224,7 @@ sqlmesh/utils/connection_pool.py,sha256=pKiO3MLPM-EDAkKNDirLsVOTdmST9BnP15CTLVKA
|
|
|
224
224
|
sqlmesh/utils/conversions.py,sha256=U1i9QRzcTc_rswt7N4KeAfeRM0MHEzDezNUD_A7BFJc,758
|
|
225
225
|
sqlmesh/utils/cron.py,sha256=eGwn4iUeiRoQzwcd9eS2TZkut8nR4yWud77N7xQ9CQ0,1829
|
|
226
226
|
sqlmesh/utils/dag.py,sha256=5Sec50yY-UBEpLU82_nzaL7Wlalwf7K8EvLL8sBs2Z8,9049
|
|
227
|
-
sqlmesh/utils/date.py,sha256=
|
|
227
|
+
sqlmesh/utils/date.py,sha256=m0NHAqSQYqZnvuNHVk9RNEktiE_LbyqcO_O0SVxcGrw,16460
|
|
228
228
|
sqlmesh/utils/errors.py,sha256=rktXVSd4R3tii7_k_pnex05ZXS7QnlFx1np1u-pjSSU,8000
|
|
229
229
|
sqlmesh/utils/git.py,sha256=v1MD4Zwn52UBn_tTfoKn8SAPJVGC6SEFrJ4WEJFbgF0,1868
|
|
230
230
|
sqlmesh/utils/hashing.py,sha256=nZRKvLNQ83tLG4IoXshVJZf-MbDrXC1HOeNw8Ji-tMM,578
|
|
@@ -234,16 +234,16 @@ 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
|
-
sqlmesh/utils/windows.py,sha256=
|
|
239
|
+
sqlmesh/utils/windows.py,sha256=0F9RdpuuCoG5NiEDXvWlAGCiJ-59OjSAmgFF5wW05aY,1133
|
|
240
240
|
sqlmesh/utils/yaml.py,sha256=KFBd7hsKNRTtRudGR7d410qUYffQv0EWRcDM8hVNNZg,3025
|
|
241
|
-
sqlmesh-0.
|
|
241
|
+
sqlmesh-0.227.2.dev6.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
242
242
|
sqlmesh_dbt/__init__.py,sha256=awYS5y5mz-1NUmx6i5h5NSTJ7tidRl9NC0FAnFWSF6U,350
|
|
243
|
-
sqlmesh_dbt/cli.py,sha256=
|
|
243
|
+
sqlmesh_dbt/cli.py,sha256=p9foHjAW9ni7BTOJ2loynk47M0Sf43QIJZRggOzF5tc,6351
|
|
244
244
|
sqlmesh_dbt/console.py,sha256=RwWLYnEZHzn9Xp-e2gbZvkdKbWbBLN146geI84mJitg,1132
|
|
245
245
|
sqlmesh_dbt/error.py,sha256=1sPNU6Dik30DR9WTCvGp3ED-pzNmAA3LhP95BXb3ndI,1146
|
|
246
|
-
sqlmesh_dbt/operations.py,sha256
|
|
246
|
+
sqlmesh_dbt/operations.py,sha256=-9yM-czQpaA-U42kad5a5OJXIAh63FiIBtuP_672AF0,14331
|
|
247
247
|
sqlmesh_dbt/options.py,sha256=noB_qK4uGGi7Erqk1XkkMaFz5aUc6lp44wwn1Nv_LI4,737
|
|
248
248
|
sqlmesh_dbt/selectors.py,sha256=nmVrFsC7CR2A24FdGTp5Wz7MuWreI-xLQTpOTy0H9K4,6543
|
|
249
249
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -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.
|
|
367
|
-
sqlmesh-0.
|
|
368
|
-
sqlmesh-0.
|
|
369
|
-
sqlmesh-0.
|
|
370
|
-
sqlmesh-0.
|
|
366
|
+
sqlmesh-0.227.2.dev6.dist-info/METADATA,sha256=ROcHstdXOc9MFy57XBnmYS9iS9bhfpc7tLui43oGMMg,26685
|
|
367
|
+
sqlmesh-0.227.2.dev6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
368
|
+
sqlmesh-0.227.2.dev6.dist-info/entry_points.txt,sha256=sHAf6tQczIM8xZoduN4qaUjV7QEPVUUW_LCT8EDUMv4,155
|
|
369
|
+
sqlmesh-0.227.2.dev6.dist-info/top_level.txt,sha256=RQ-33FPe2IgL0rgossAfJkCRtqslz9b7wFARqiWLC5Q,24
|
|
370
|
+
sqlmesh-0.227.2.dev6.dist-info/RECORD,,
|
sqlmesh_dbt/cli.py
CHANGED
|
@@ -78,6 +78,22 @@ resource_type_option = click.option(
|
|
|
78
78
|
default=False,
|
|
79
79
|
help="Display debug logging during dbt execution. Useful for debugging and making bug reports events to help when debugging.",
|
|
80
80
|
)
|
|
81
|
+
@click.option(
|
|
82
|
+
"--log-level",
|
|
83
|
+
default="info",
|
|
84
|
+
type=click.Choice(["debug", "info", "warn", "error", "none"]),
|
|
85
|
+
help="Specify the minimum severity of events that are logged to the console and the log file.",
|
|
86
|
+
)
|
|
87
|
+
@click.option(
|
|
88
|
+
"--profiles-dir",
|
|
89
|
+
type=click.Path(exists=True, file_okay=False, path_type=Path),
|
|
90
|
+
help="Which directory to look in for the profiles.yml file. If not set, dbt will look in the current working directory first, then HOME/.dbt/",
|
|
91
|
+
)
|
|
92
|
+
@click.option(
|
|
93
|
+
"--project-dir",
|
|
94
|
+
type=click.Path(exists=True, file_okay=False, path_type=Path),
|
|
95
|
+
help="Which directory to look in for the dbt_project.yml file. Default is the current working directory and its parents.",
|
|
96
|
+
)
|
|
81
97
|
@click.pass_context
|
|
82
98
|
@cli_global_error_handler
|
|
83
99
|
def dbt(
|
|
@@ -85,6 +101,9 @@ def dbt(
|
|
|
85
101
|
profile: t.Optional[str] = None,
|
|
86
102
|
target: t.Optional[str] = None,
|
|
87
103
|
debug: bool = False,
|
|
104
|
+
log_level: t.Optional[str] = None,
|
|
105
|
+
profiles_dir: t.Optional[Path] = None,
|
|
106
|
+
project_dir: t.Optional[Path] = None,
|
|
88
107
|
) -> None:
|
|
89
108
|
"""
|
|
90
109
|
An ELT tool for managing your SQL transformations and data models, powered by the SQLMesh engine.
|
|
@@ -97,7 +116,13 @@ def dbt(
|
|
|
97
116
|
# we have a partially applied function here because subcommands might set extra options like --vars
|
|
98
117
|
# that need to be known before we attempt to load the project
|
|
99
118
|
ctx.obj = functools.partial(
|
|
100
|
-
create,
|
|
119
|
+
create,
|
|
120
|
+
project_dir=project_dir,
|
|
121
|
+
profiles_dir=profiles_dir,
|
|
122
|
+
profile=profile,
|
|
123
|
+
target=target,
|
|
124
|
+
debug=debug,
|
|
125
|
+
log_level=log_level,
|
|
101
126
|
)
|
|
102
127
|
|
|
103
128
|
if not ctx.invoked_subcommand:
|
sqlmesh_dbt/operations.py
CHANGED
|
@@ -232,11 +232,13 @@ class DbtOperations:
|
|
|
232
232
|
|
|
233
233
|
def create(
|
|
234
234
|
project_dir: t.Optional[Path] = None,
|
|
235
|
+
profiles_dir: t.Optional[Path] = None,
|
|
235
236
|
profile: t.Optional[str] = None,
|
|
236
237
|
target: t.Optional[str] = None,
|
|
237
238
|
vars: t.Optional[t.Dict[str, t.Any]] = None,
|
|
238
239
|
threads: t.Optional[int] = None,
|
|
239
240
|
debug: bool = False,
|
|
241
|
+
log_level: t.Optional[str] = None,
|
|
240
242
|
) -> DbtOperations:
|
|
241
243
|
with Progress(transient=True) as progress:
|
|
242
244
|
# Indeterminate progress bar before SQLMesh import to provide feedback to the user that something is indeed happening
|
|
@@ -256,7 +258,7 @@ def create(
|
|
|
256
258
|
while root_logger.hasHandlers():
|
|
257
259
|
root_logger.removeHandler(root_logger.handlers[0])
|
|
258
260
|
|
|
259
|
-
configure_logging(force_debug=debug)
|
|
261
|
+
configure_logging(force_debug=debug, log_level=log_level)
|
|
260
262
|
set_console(DbtCliConsole())
|
|
261
263
|
|
|
262
264
|
progress.update(load_task_id, description="Loading project", total=None)
|
|
@@ -267,7 +269,11 @@ def create(
|
|
|
267
269
|
sqlmesh_context = Context(
|
|
268
270
|
paths=[project_dir],
|
|
269
271
|
config_loader_kwargs=dict(
|
|
270
|
-
profile=profile,
|
|
272
|
+
profile=profile,
|
|
273
|
+
target=target,
|
|
274
|
+
variables=vars,
|
|
275
|
+
threads=threads,
|
|
276
|
+
profiles_dir=profiles_dir,
|
|
271
277
|
),
|
|
272
278
|
load=True,
|
|
273
279
|
# DbtSelector selects based on dbt model fqn's rather than SQLMesh model names
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|