sqlmesh 0.181.2.dev1__py3-none-any.whl → 0.181.2.dev3__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/__init__.py +2 -1
- sqlmesh/_version.py +2 -2
- sqlmesh/cli/main.py +7 -1
- sqlmesh/core/console.py +6 -0
- sqlmesh/core/table_diff.py +10 -1
- sqlmesh/magics.py +6 -1
- {sqlmesh-0.181.2.dev1.dist-info → sqlmesh-0.181.2.dev3.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev1.dist-info → sqlmesh-0.181.2.dev3.dist-info}/RECORD +12 -12
- {sqlmesh-0.181.2.dev1.dist-info → sqlmesh-0.181.2.dev3.dist-info}/WHEEL +1 -1
- {sqlmesh-0.181.2.dev1.dist-info → sqlmesh-0.181.2.dev3.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev1.dist-info → sqlmesh-0.181.2.dev3.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev1.dist-info → sqlmesh-0.181.2.dev3.dist-info}/top_level.txt +0 -0
sqlmesh/__init__.py
CHANGED
|
@@ -172,6 +172,7 @@ def configure_logging(
|
|
|
172
172
|
write_to_file: bool = True,
|
|
173
173
|
log_limit: int = c.DEFAULT_LOG_LIMIT,
|
|
174
174
|
log_file_dir: t.Optional[t.Union[str, Path]] = None,
|
|
175
|
+
ignore_warnings: bool = False,
|
|
175
176
|
) -> None:
|
|
176
177
|
# Remove noisy grpc logs that are not useful for users
|
|
177
178
|
os.environ["GRPC_VERBOSITY"] = os.environ.get("GRPC_VERBOSITY", "NONE")
|
|
@@ -186,7 +187,7 @@ def configure_logging(
|
|
|
186
187
|
if write_to_stdout:
|
|
187
188
|
stdout_handler = logging.StreamHandler(sys.stdout)
|
|
188
189
|
stdout_handler.setFormatter(CustomFormatter())
|
|
189
|
-
stdout_handler.setLevel(level)
|
|
190
|
+
stdout_handler.setLevel(logging.ERROR if ignore_warnings else level)
|
|
190
191
|
logger.addHandler(stdout_handler)
|
|
191
192
|
|
|
192
193
|
log_file_dir = log_file_dir or c.DEFAULT_LOG_FILE_DIR
|
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.181.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 181, 2, '
|
|
20
|
+
__version__ = version = '0.181.2.dev3'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 181, 2, 'dev3')
|
sqlmesh/cli/main.py
CHANGED
|
@@ -102,7 +102,13 @@ def cli(
|
|
|
102
102
|
|
|
103
103
|
configs = load_configs(config, Context.CONFIG_TYPE, paths)
|
|
104
104
|
log_limit = list(configs.values())[0].log_limit
|
|
105
|
-
configure_logging(
|
|
105
|
+
configure_logging(
|
|
106
|
+
debug,
|
|
107
|
+
log_to_stdout,
|
|
108
|
+
log_limit=log_limit,
|
|
109
|
+
log_file_dir=log_file_dir,
|
|
110
|
+
ignore_warnings=ignore_warnings,
|
|
111
|
+
)
|
|
106
112
|
configure_console(ignore_warnings=ignore_warnings)
|
|
107
113
|
|
|
108
114
|
try:
|
sqlmesh/core/console.py
CHANGED
|
@@ -2181,6 +2181,12 @@ class TerminalConsole(Console):
|
|
|
2181
2181
|
def show_row_diff(
|
|
2182
2182
|
self, row_diff: RowDiff, show_sample: bool = True, skip_grain_check: bool = False
|
|
2183
2183
|
) -> None:
|
|
2184
|
+
if row_diff.empty:
|
|
2185
|
+
self.console.print(
|
|
2186
|
+
"\n[b][red]Neither the source nor the target table contained any records[/red][/b]"
|
|
2187
|
+
)
|
|
2188
|
+
return
|
|
2189
|
+
|
|
2184
2190
|
source_name = row_diff.source
|
|
2185
2191
|
if row_diff.source_alias:
|
|
2186
2192
|
source_name = row_diff.source_alias.upper()
|
sqlmesh/core/table_diff.py
CHANGED
|
@@ -83,6 +83,15 @@ class RowDiff(PydanticModel, frozen=True):
|
|
|
83
83
|
"""Count of the target."""
|
|
84
84
|
return int(self.stats["t_count"])
|
|
85
85
|
|
|
86
|
+
@property
|
|
87
|
+
def empty(self) -> bool:
|
|
88
|
+
return (
|
|
89
|
+
self.source_count == 0
|
|
90
|
+
and self.target_count == 0
|
|
91
|
+
and self.s_only_count == 0
|
|
92
|
+
and self.t_only_count == 0
|
|
93
|
+
)
|
|
94
|
+
|
|
86
95
|
@property
|
|
87
96
|
def count_pct_change(self) -> float:
|
|
88
97
|
"""The percentage change of the counts."""
|
|
@@ -446,7 +455,7 @@ class TableDiff:
|
|
|
446
455
|
|
|
447
456
|
summary_query = exp.select(*summary_sums).from_(table)
|
|
448
457
|
|
|
449
|
-
stats_df = self.adapter.fetchdf(summary_query, quote_identifiers=True)
|
|
458
|
+
stats_df = self.adapter.fetchdf(summary_query, quote_identifiers=True).fillna(0)
|
|
450
459
|
stats_df["s_only_count"] = stats_df["s_count"] - stats_df["join_count"]
|
|
451
460
|
stats_df["t_only_count"] = stats_df["t_count"] - stats_df["join_count"]
|
|
452
461
|
stats = stats_df.iloc[0].to_dict()
|
sqlmesh/magics.py
CHANGED
|
@@ -134,7 +134,12 @@ class SQLMeshMagics(Magics):
|
|
|
134
134
|
args = parse_argstring(self.context, line)
|
|
135
135
|
configs = load_configs(args.config, Context.CONFIG_TYPE, args.paths)
|
|
136
136
|
log_limit = list(configs.values())[0].log_limit
|
|
137
|
-
configure_logging(
|
|
137
|
+
configure_logging(
|
|
138
|
+
args.debug,
|
|
139
|
+
log_limit=log_limit,
|
|
140
|
+
log_file_dir=args.log_file_dir,
|
|
141
|
+
ignore_warnings=args.ignore_warnings,
|
|
142
|
+
)
|
|
138
143
|
configure_console(ignore_warnings=args.ignore_warnings)
|
|
139
144
|
try:
|
|
140
145
|
context = Context(paths=args.paths, config=configs, gateway=args.gateway)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
sqlmesh/__init__.py,sha256=
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
3
|
-
sqlmesh/magics.py,sha256=
|
|
1
|
+
sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
|
|
2
|
+
sqlmesh/_version.py,sha256=PSgl2wYNFVvAmZrs12fikG3T2lK9NnW_P4DKPfoB4p0,528
|
|
3
|
+
sqlmesh/magics.py,sha256=9oY1Uz8uwsuTtPRg9HTYDxnGiJ7-OVRCpmCgAhbKHUU,39431
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
sqlmesh/cicd/bot.py,sha256=2zlbn-DXkqQzr3lA0__IGU4XaIfXBXBKLWXNI2DRJX8,759
|
|
7
7
|
sqlmesh/cicd/config.py,sha256=mpgkisSBBovlNrNZir2unT8Wes6b38RW2UsU_o4e8vY,109
|
|
8
8
|
sqlmesh/cli/__init__.py,sha256=MAXAyO7isbyM-PaSdFjkJNcjn32WjOl0XzxT5gvp_vo,1690
|
|
9
9
|
sqlmesh/cli/example_project.py,sha256=QAFQbw_kzqn30GLTthqsuWXbFDBpX8W6RsCgQ-jx65M,9308
|
|
10
|
-
sqlmesh/cli/main.py,sha256=
|
|
10
|
+
sqlmesh/cli/main.py,sha256=z1Af0bwqtnYHzkY0_9REpaJe-onxvXN4rLw6upyxKec,31979
|
|
11
11
|
sqlmesh/cli/options.py,sha256=aC_L5WnMScKzMU55BD1Y-8R-QzqCkPSYrlCI-payHRA,1333
|
|
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=-FGOalIrfCN5ZyDIYW8Emx3GIF9qeaNfNW00lUogoFg,149608
|
|
15
15
|
sqlmesh/core/constants.py,sha256=oqt6zjepUhQoWlgapKn_HpG7Pu9mrFwepdX5caNfJUI,2499
|
|
16
16
|
sqlmesh/core/context.py,sha256=kLKXwOLc_5Orv-SxvI0zbpL9ZJ0XkB9HZgd9R6uh-9Y,114691
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=s9toP17d4tJfOpFH91LcjGK2CM64PVuB0MPkeFgF4hQ,20415
|
|
@@ -29,7 +29,7 @@ sqlmesh/core/schema_diff.py,sha256=mE28W51JUQz6q8inSOw2Cds84VPIqPxI6C2ed6xLmrg,2
|
|
|
29
29
|
sqlmesh/core/schema_loader.py,sha256=lvrI9k7hr1P4X4E6t3U-KrcuvdQuw0UdNlN90P2s52w,3563
|
|
30
30
|
sqlmesh/core/selector.py,sha256=9riBQ6gPySg546x0JaXXITw2eZgGe9iVKcynAUJ1mmw,12137
|
|
31
31
|
sqlmesh/core/signal.py,sha256=yVLXewYP6eH0vt-EwaIaI2WwHz6hWsVr-Kb2m4kP1FU,1353
|
|
32
|
-
sqlmesh/core/table_diff.py,sha256=
|
|
32
|
+
sqlmesh/core/table_diff.py,sha256=lfEzA-3xYIUkrnz7cAgq1vd6h6BGWnEuVSXwWNBJL9U,23470
|
|
33
33
|
sqlmesh/core/user.py,sha256=EJ6R4R1iK67n80vBoCCsidF56IR7xEYqiCEO-nrVMso,1660
|
|
34
34
|
sqlmesh/core/analytics/__init__.py,sha256=ou3ZXAJfQOXEifj-PzaXwMDSvJzsVaqaMkUopiI00kM,3247
|
|
35
35
|
sqlmesh/core/analytics/collector.py,sha256=sggJvER16Jrg5triTC27E2KwaQvfkVDv4D6R1lVPH5I,13058
|
|
@@ -265,7 +265,7 @@ sqlmesh/utils/pandas.py,sha256=j_tYhuPcWpzuPceZZ6IhdTVbmxYyGJW7l4FHr4bQqjM,1824
|
|
|
265
265
|
sqlmesh/utils/pydantic.py,sha256=ioaAzYF42PutEJRyAS11-AHguiCG3yWI6VRcTVa2G-g,10470
|
|
266
266
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
267
267
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
268
|
-
sqlmesh-0.181.2.
|
|
268
|
+
sqlmesh-0.181.2.dev3.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
269
269
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
270
270
|
web/client/dist/index.html,sha256=cQRIlDgkl6OgeWuHI9hM8bJhKUE9-Ji2NpQa2hlgNM8,5472
|
|
271
271
|
web/client/dist/assets/Audits-4U9LnWyN.js,sha256=reXu-sKJ76kiaAZIGkCPvgO68Km9tj1PN_9mx6X6WAY,997
|
|
@@ -382,8 +382,8 @@ web/server/api/endpoints/models.py,sha256=SzS5bshzdXyM6hb948sZ_3k-xhpGCHkxkb7pHz
|
|
|
382
382
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
383
383
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
384
384
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
385
|
-
sqlmesh-0.181.2.
|
|
386
|
-
sqlmesh-0.181.2.
|
|
387
|
-
sqlmesh-0.181.2.
|
|
388
|
-
sqlmesh-0.181.2.
|
|
389
|
-
sqlmesh-0.181.2.
|
|
385
|
+
sqlmesh-0.181.2.dev3.dist-info/METADATA,sha256=ZmszJPQM0VJhcqnj_XLFZDluj21V6RhRVQfm-UNWqsY,25307
|
|
386
|
+
sqlmesh-0.181.2.dev3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
387
|
+
sqlmesh-0.181.2.dev3.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
388
|
+
sqlmesh-0.181.2.dev3.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
389
|
+
sqlmesh-0.181.2.dev3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|