omnata-plugin-runtime 0.10.6a242__tar.gz → 0.10.6a244__tar.gz
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.
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/json_schema.py +12 -11
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/LICENSE +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/README.md +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.10.6a242 → omnata_plugin_runtime-0.10.6a244}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.10.6-
|
3
|
+
version = "0.10.6-a244"
|
4
4
|
description = "Classes and common runtime components for building and running Omnata Plugins"
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
6
6
|
readme = "README.md"
|
@@ -257,13 +257,6 @@ class SnowflakeViewColumn(BaseModel):
|
|
257
257
|
if column not in columns_to_move:
|
258
258
|
columns_to_move.append(column)
|
259
259
|
|
260
|
-
# do another pass, this time replacing the original name with the transformed name
|
261
|
-
for column in join_columns:
|
262
|
-
for other_column in join_columns:
|
263
|
-
if f'"{column.original_name}"' in other_column.expression:
|
264
|
-
if column.original_name != column.name:
|
265
|
-
other_column.expression = other_column.expression.replace(f'"{column.original_name}"',f'"{column.name}"')
|
266
|
-
|
267
260
|
# Move collected columns to the front
|
268
261
|
for column in columns_to_move:
|
269
262
|
join_columns.remove(column)
|
@@ -433,11 +426,19 @@ class SnowflakeViewParts(BaseModel):
|
|
433
426
|
In the final select statement, the join columns will be aliased with their transformed names.
|
434
427
|
"""
|
435
428
|
ctes = [self.main_part.cte_text(original_name=True)] + [part.cte_text(original_name=True) for part in self.joined_parts]
|
429
|
+
# we need a final CTE which selects the main part's direct columns and joined columns, with their original names
|
430
|
+
# then the final select statement will just be aliasing to the transformed names
|
431
|
+
final_cte = f""" OMNATA_FINAL_CTE as (
|
432
|
+
select {', '.join([c.definition(original_name=True) for c in self.main_part.direct_columns() + self.main_part.join_columns()])}
|
433
|
+
from "{self.main_part.stream_name}"
|
434
|
+
) """
|
435
|
+
ctes.append(final_cte)
|
436
436
|
all_ctes = "\n,".join(ctes)
|
437
|
-
main_columns = SnowflakeViewColumn.order_by_reference(
|
438
|
-
|
439
|
-
|
440
|
-
for c in main_columns]
|
437
|
+
main_columns:List[SnowflakeViewColumn] = SnowflakeViewColumn.order_by_reference(self.main_part.direct_columns() +
|
438
|
+
self.main_part.join_columns())
|
439
|
+
column_clauses = [f"\"OMNATA_FINAL_CTE\"."+c.original_to_transformed()
|
440
|
+
for c in main_columns]
|
441
|
+
|
441
442
|
view_body = f"""with {all_ctes}
|
442
443
|
select {', '.join(column_clauses)}
|
443
444
|
from "{self.main_part.stream_name}" """
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|