omnata-plugin-runtime 0.10.7a249__tar.gz → 0.10.7a251__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.7a249 → omnata_plugin_runtime-0.10.7a251}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/json_schema.py +20 -7
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/LICENSE +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/README.md +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.10.7a249 → omnata_plugin_runtime-0.10.7a251}/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.7-
|
3
|
+
version = "0.10.7-a251"
|
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"
|
@@ -252,14 +252,20 @@ class SnowflakeViewColumn(BaseModel):
|
|
252
252
|
# Collect columns to be moved
|
253
253
|
columns_to_move:List[Self] = []
|
254
254
|
# Collect Omnata System columns and keep them at the front
|
255
|
-
|
255
|
+
omnata_system_columns_start = []
|
256
|
+
omnata_system_columns_end = []
|
256
257
|
for column in join_columns[:]:
|
257
|
-
if column.original_name
|
258
|
+
if column.original_name=="OMNATA_APP_IDENTIFIER":
|
258
259
|
join_columns.remove(column)
|
259
|
-
|
260
|
+
omnata_system_columns_start.append(column)
|
261
|
+
elif column.original_name.startswith("OMNATA_"):
|
262
|
+
join_columns.remove(column)
|
263
|
+
omnata_system_columns_end.append(column)
|
260
264
|
|
261
265
|
for column in join_columns:
|
262
266
|
for other_column in join_columns:
|
267
|
+
if column==other_column:
|
268
|
+
continue
|
263
269
|
if f'"{column.original_name}"' in other_column.expression:
|
264
270
|
if column not in columns_to_move:
|
265
271
|
columns_to_move.append(column)
|
@@ -268,7 +274,7 @@ class SnowflakeViewColumn(BaseModel):
|
|
268
274
|
for column in columns_to_move:
|
269
275
|
join_columns.remove(column)
|
270
276
|
join_columns.insert(0, column)
|
271
|
-
return
|
277
|
+
return omnata_system_columns_start + join_columns + omnata_system_columns_end
|
272
278
|
|
273
279
|
|
274
280
|
class SnowflakeViewJoin(BaseModel):
|
@@ -450,8 +456,7 @@ class SnowflakeViewParts(BaseModel):
|
|
450
456
|
|
451
457
|
ctes.append(final_cte)
|
452
458
|
all_ctes = "\n,".join(ctes)
|
453
|
-
main_columns:List[SnowflakeViewColumn] =
|
454
|
-
self.main_part.join_columns())
|
459
|
+
main_columns:List[SnowflakeViewColumn] = self.main_part.columns
|
455
460
|
column_clauses = [f"\"OMNATA_FINAL_CTE\"."+c.original_to_transformed()
|
456
461
|
for c in main_columns]
|
457
462
|
|
@@ -671,7 +676,15 @@ def normalized_view_part(
|
|
671
676
|
if json_schema.joins:
|
672
677
|
joins = json_schema.joins
|
673
678
|
comment = json_schema.description
|
674
|
-
|
679
|
+
|
680
|
+
direct_view_columns = [c for c in view_columns if c.is_join_column]
|
681
|
+
join_view_columns = [c for c in view_columns if not c.is_join_column]
|
682
|
+
# The final order of view columns is:
|
683
|
+
#- APP_IDENTIFIER
|
684
|
+
#- Direct and joined columns, ordered so that columns that reference other columns are defined after the columns they reference
|
685
|
+
#- OMNATA_RETRIEVE_DATE, OMNATA_RAW_RECORD, OMNATA_IS_DELETED, OMNATA_RUN_ID
|
686
|
+
view_columns = SnowflakeViewColumn.order_by_reference(direct_view_columns +
|
687
|
+
join_view_columns)
|
675
688
|
return SnowflakeViewPart(
|
676
689
|
stream_name=stream_name,
|
677
690
|
raw_table_location=raw_table_location,
|
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
|