sqlmesh 0.199.1.dev36__py3-none-any.whl → 0.199.1.dev38__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/console.py +3 -1
- sqlmesh/core/engine_adapter/risingwave.py +33 -0
- sqlmesh/integrations/github/cicd/command.py +3 -1
- sqlmesh/integrations/github/cicd/controller.py +9 -0
- {sqlmesh-0.199.1.dev36.dist-info → sqlmesh-0.199.1.dev38.dist-info}/METADATA +1 -1
- {sqlmesh-0.199.1.dev36.dist-info → sqlmesh-0.199.1.dev38.dist-info}/RECORD +11 -11
- {sqlmesh-0.199.1.dev36.dist-info → sqlmesh-0.199.1.dev38.dist-info}/WHEEL +0 -0
- {sqlmesh-0.199.1.dev36.dist-info → sqlmesh-0.199.1.dev38.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.199.1.dev36.dist-info → sqlmesh-0.199.1.dev38.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.199.1.dev36.dist-info → sqlmesh-0.199.1.dev38.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.199.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 199, 1, '
|
|
20
|
+
__version__ = version = '0.199.1.dev38'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 199, 1, 'dev38')
|
sqlmesh/core/console.py
CHANGED
|
@@ -3107,7 +3107,9 @@ class MarkdownConsole(CaptureTerminalConsole):
|
|
|
3107
3107
|
AUDIT_PADDING = 7
|
|
3108
3108
|
|
|
3109
3109
|
def __init__(self, **kwargs: t.Any) -> None:
|
|
3110
|
-
super().__init__(
|
|
3110
|
+
super().__init__(
|
|
3111
|
+
**{**kwargs, "console": RichConsole(no_color=True, width=kwargs.pop("width", None))}
|
|
3112
|
+
)
|
|
3111
3113
|
|
|
3112
3114
|
def show_environment_difference_summary(
|
|
3113
3115
|
self,
|
|
@@ -14,6 +14,7 @@ from sqlmesh.core.engine_adapter.shared import (
|
|
|
14
14
|
CommentCreationTable,
|
|
15
15
|
)
|
|
16
16
|
|
|
17
|
+
from sqlmesh.utils.errors import SQLMeshError
|
|
17
18
|
|
|
18
19
|
if t.TYPE_CHECKING:
|
|
19
20
|
from sqlmesh.core._typing import TableName
|
|
@@ -32,5 +33,37 @@ class RisingwaveEngineAdapter(PostgresEngineAdapter):
|
|
|
32
33
|
SUPPORTS_TRANSACTIONS = False
|
|
33
34
|
MAX_IDENTIFIER_LENGTH = None
|
|
34
35
|
|
|
36
|
+
def columns(
|
|
37
|
+
self, table_name: TableName, include_pseudo_columns: bool = False
|
|
38
|
+
) -> t.Dict[str, exp.DataType]:
|
|
39
|
+
"""Fetches column names and types for the target_table"""
|
|
40
|
+
table = exp.to_table(table_name)
|
|
41
|
+
|
|
42
|
+
sql = (
|
|
43
|
+
exp.select("rw_columns.name AS column_name", "rw_columns.data_type AS data_type")
|
|
44
|
+
.from_("rw_catalog.rw_columns")
|
|
45
|
+
.join("rw_catalog.rw_relations", on="rw_relations.id=rw_columns.relation_id")
|
|
46
|
+
.join("rw_catalog.rw_schemas", on="rw_schemas.id=rw_relations.schema_id")
|
|
47
|
+
.where(
|
|
48
|
+
exp.and_(
|
|
49
|
+
exp.column("name", table="rw_relations").eq(table.alias_or_name),
|
|
50
|
+
exp.column("name", table="rw_columns").neq("_row_id"),
|
|
51
|
+
exp.column("name", table="rw_columns").neq("_rw_timestamp"),
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
if table.db:
|
|
57
|
+
sql = sql.where(exp.column("name", table="rw_schemas").eq(table.db))
|
|
58
|
+
|
|
59
|
+
self.execute(sql)
|
|
60
|
+
resp = self.cursor.fetchall()
|
|
61
|
+
if not resp:
|
|
62
|
+
raise SQLMeshError(f"Could not get columns for table {table_name}. Table not found.")
|
|
63
|
+
return {
|
|
64
|
+
column_name: exp.DataType.build(data_type, dialect=self.dialect, udt=True)
|
|
65
|
+
for column_name, data_type in resp
|
|
66
|
+
}
|
|
67
|
+
|
|
35
68
|
def _truncate_table(self, table_name: TableName) -> None:
|
|
36
69
|
return self.execute(exp.Delete(this=exp.to_table(table_name)))
|
|
@@ -28,7 +28,9 @@ logger = logging.getLogger(__name__)
|
|
|
28
28
|
@click.pass_context
|
|
29
29
|
def github(ctx: click.Context, token: str) -> None:
|
|
30
30
|
"""Github Action CI/CD Bot. See https://sqlmesh.readthedocs.io/en/stable/integrations/github/ for details"""
|
|
31
|
-
|
|
31
|
+
# set a larger width because if none is specified, it auto-detects 80 characters when running in GitHub Actions
|
|
32
|
+
# which can result in surprise newlines when outputting dates to backfill
|
|
33
|
+
set_console(MarkdownConsole(width=1000))
|
|
32
34
|
ctx.obj["github"] = GithubController(
|
|
33
35
|
paths=ctx.obj["paths"],
|
|
34
36
|
token=token,
|
|
@@ -485,6 +485,12 @@ class GithubController:
|
|
|
485
485
|
print(f"{key}={value}", file=fh)
|
|
486
486
|
|
|
487
487
|
def get_plan_summary(self, plan: Plan) -> str:
|
|
488
|
+
# use Verbosity.VERY_VERBOSE to prevent the list of models from being truncated
|
|
489
|
+
# this is particularly important for the "Models needing backfill" list because
|
|
490
|
+
# there is no easy way to tell this otherwise
|
|
491
|
+
orig_verbosity = self._console.verbosity
|
|
492
|
+
self._console.verbosity = Verbosity.VERY_VERBOSE
|
|
493
|
+
|
|
488
494
|
try:
|
|
489
495
|
# Clear out any output that might exist from prior steps
|
|
490
496
|
self._console.clear_captured_outputs()
|
|
@@ -517,7 +523,10 @@ class GithubController:
|
|
|
517
523
|
|
|
518
524
|
return f"{difference_summary}\n{missing_dates}{plan_flags_section}"
|
|
519
525
|
except PlanError as e:
|
|
526
|
+
logger.exception("Plan failed to generate")
|
|
520
527
|
return f"Plan failed to generate. Check for pending or unresolved changes. Error: {e}"
|
|
528
|
+
finally:
|
|
529
|
+
self._console.verbosity = orig_verbosity
|
|
521
530
|
|
|
522
531
|
def run_tests(self) -> t.Tuple[ModelTextTestResult, str]:
|
|
523
532
|
"""
|
|
@@ -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=u56_WWQvlsIhySk9UleCHs6ctfzK9-iSGMzwpprC0c0,530
|
|
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
|
|
@@ -11,7 +11,7 @@ sqlmesh/cli/options.py,sha256=-4ZclMIeIg8tghLowtmQNmpEFlm0QtOVEh40NqRdFHA,2499
|
|
|
11
11
|
sqlmesh/cli/project_init.py,sha256=5JmDmUK0WJs39hM-p76uzHYdo1Hnx6fKuJg_pR3Hn5A,16419
|
|
12
12
|
sqlmesh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
sqlmesh/core/_typing.py,sha256=e1f7xO2aZCy38M_3VoDy-XI3shyd99-IFctgIFSgXWM,497
|
|
14
|
-
sqlmesh/core/console.py,sha256=
|
|
14
|
+
sqlmesh/core/console.py,sha256=mrh0oTT4kVesXbmbaPFgamhbEt8mE94FhUIubLvrLAQ,160808
|
|
15
15
|
sqlmesh/core/constants.py,sha256=gUABXWYgH_XOSbaZAJsR5o1dmA61JDCvBDyxqqXX3LM,2630
|
|
16
16
|
sqlmesh/core/context.py,sha256=9a8RqBBHQXjH7nMYiTcQRtp5_NYpk_9EFpPoBfDx94o,124321
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=CeUmMBJzN__98YohrtAiIYPIZI9mrGBk6bVADWBLUw8,21692
|
|
@@ -70,7 +70,7 @@ sqlmesh/core/engine_adapter/mssql.py,sha256=N-l9RReP45hg9CNKCQTrg4BmwKtN-v9xK68J
|
|
|
70
70
|
sqlmesh/core/engine_adapter/mysql.py,sha256=lVC-siXZK3iSfqCmBjZNw8uy09Z8la8v8_oUZ-E2OwI,6966
|
|
71
71
|
sqlmesh/core/engine_adapter/postgres.py,sha256=4eXBDKXb6uiu8B7nD60b2p9pbkc8Z1Ycgavw7Necxj4,4626
|
|
72
72
|
sqlmesh/core/engine_adapter/redshift.py,sha256=35T2ZLKozakRNeD0zykWk8RvXomfX9xi4Zg5Y4ZAVhg,16779
|
|
73
|
-
sqlmesh/core/engine_adapter/risingwave.py,sha256=
|
|
73
|
+
sqlmesh/core/engine_adapter/risingwave.py,sha256=GY0u085TWerl8kTRNJpEutdD5FBsoPijQ0CcOkWOJEE,2359
|
|
74
74
|
sqlmesh/core/engine_adapter/shared.py,sha256=zL2W2t9af9mo80aSO0fz5TqV6mY8_kI5VYLswbKdZyk,13369
|
|
75
75
|
sqlmesh/core/engine_adapter/snowflake.py,sha256=IEEzepxNpfqBIMe4ziz2k8fjOcJPeQPZyM3XljymAj0,28874
|
|
76
76
|
sqlmesh/core/engine_adapter/spark.py,sha256=sYkVOPS0X43UPbI0z7Hh_EpKlI36qkOcr4NNFOTQlLs,21045
|
|
@@ -160,9 +160,9 @@ sqlmesh/integrations/llm.py,sha256=URgp3JKr06HYv6hGlJ7DQ9m3QCc41xRWK23HzmGpbDI,1
|
|
|
160
160
|
sqlmesh/integrations/slack.py,sha256=nxLxu5WztGbZH3JdqnzyPqmJUMfRdJ_49LQ7zR-u39Q,6801
|
|
161
161
|
sqlmesh/integrations/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
162
162
|
sqlmesh/integrations/github/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
163
|
-
sqlmesh/integrations/github/cicd/command.py,sha256=
|
|
163
|
+
sqlmesh/integrations/github/cicd/command.py,sha256=xMUMJmNT0z8nWb992SzgnFI2IOQu6HYrkN6_KAMnlqE,12301
|
|
164
164
|
sqlmesh/integrations/github/cicd/config.py,sha256=tRhMZaLf1p6AWXvi67n85Q-lptJNGt1Wk_Jr61ytpiM,2104
|
|
165
|
-
sqlmesh/integrations/github/cicd/controller.py,sha256=
|
|
165
|
+
sqlmesh/integrations/github/cicd/controller.py,sha256=zSHFGktuWczHQC5k0q8NkEw7f1zKcxxovWOitirMJAY,52747
|
|
166
166
|
sqlmesh/lsp/api.py,sha256=_lA_buSPZFIoLJuINbS53LbNOOaHp3orb0uFTE3aCqI,2328
|
|
167
167
|
sqlmesh/lsp/completions.py,sha256=Nt1XpFL_-QAIRM8BBBC6Ia6YG0hMZriiNJra7nGfD4Q,6676
|
|
168
168
|
sqlmesh/lsp/context.py,sha256=2aD_lH-GqAwCjTFHfCavH2fZz2T4IXQZVS7LDMAa2X4,12815
|
|
@@ -282,7 +282,7 @@ sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,120
|
|
|
282
282
|
sqlmesh/utils/rich.py,sha256=BpB47G0-JcU41LkGkeGKroexj4NOV5fox4-GOIXPgIc,3545
|
|
283
283
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
284
284
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
285
|
-
sqlmesh-0.199.1.
|
|
285
|
+
sqlmesh-0.199.1.dev38.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
286
286
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
287
287
|
web/client/dist/index.html,sha256=DAv6ABGogw4xRLb0T_92WP_S7XWyqVhwBgGKWtuQwU4,5472
|
|
288
288
|
web/client/dist/assets/Audits-BuHAmFO8.js,sha256=zbYUF6WdUGMbnMm01GMNPb7xAJwj-o5wMdL56vPo2qE,1041
|
|
@@ -400,8 +400,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
400
400
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
401
401
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
402
402
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
403
|
-
sqlmesh-0.199.1.
|
|
404
|
-
sqlmesh-0.199.1.
|
|
405
|
-
sqlmesh-0.199.1.
|
|
406
|
-
sqlmesh-0.199.1.
|
|
407
|
-
sqlmesh-0.199.1.
|
|
403
|
+
sqlmesh-0.199.1.dev38.dist-info/METADATA,sha256=0N6DkubXOnYzU0zxXylxo7WWCkAlmwqWQFiC8ULomuQ,26659
|
|
404
|
+
sqlmesh-0.199.1.dev38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
405
|
+
sqlmesh-0.199.1.dev38.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
406
|
+
sqlmesh-0.199.1.dev38.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
407
|
+
sqlmesh-0.199.1.dev38.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|