omnata-plugin-runtime 0.10.11a262__tar.gz → 0.10.12__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.11a262 → omnata_plugin_runtime-0.10.12}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/json_schema.py +32 -27
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/LICENSE +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/README.md +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/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.
|
3
|
+
version = "0.10.12"
|
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"
|
@@ -572,35 +572,40 @@ class SnowflakeViewParts(BaseModel):
|
|
572
572
|
|
573
573
|
return cls(main_part=main_stream_view_part, joined_parts=joined_parts)
|
574
574
|
|
575
|
-
def prune(view_part:SnowflakeViewPart,joined_parts:List[SnowflakeViewPart]) -> bool:
|
575
|
+
def prune(view_part: SnowflakeViewPart, joined_parts: List[SnowflakeViewPart]) -> bool:
|
576
576
|
"""
|
577
|
-
|
578
|
-
|
577
|
+
Iteratively prunes columns from the main view part that reference fields
|
578
|
+
that are not available in the joined parts.
|
579
579
|
"""
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
if
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
580
|
+
stack = [(view_part, joined_parts)]
|
581
|
+
columns_removed = False
|
582
|
+
|
583
|
+
while stack:
|
584
|
+
current_part, current_joined_parts = stack.pop()
|
585
|
+
for column in current_part.columns[:]: # Iterate over a copy to allow safe removal
|
586
|
+
if column.referenced_columns:
|
587
|
+
for referenced_stream_name, referenced_fields in column.referenced_columns.items():
|
588
|
+
if referenced_stream_name == current_part.stream_name:
|
589
|
+
part = current_part
|
590
|
+
else:
|
591
|
+
part = next((p for p in current_joined_parts if p.stream_name == referenced_stream_name), None)
|
592
|
+
if part is None:
|
593
|
+
logger.warning(f"Column {column.name} in stream {current_part.stream_name} references stream {referenced_stream_name}, but it was not provided")
|
594
|
+
current_part.columns.remove(column)
|
595
|
+
columns_removed = True
|
596
|
+
break
|
597
|
+
|
598
|
+
columns_missing_from_join = part.columns_missing(referenced_fields)
|
599
|
+
if columns_missing_from_join:
|
600
|
+
logger.warning(f"Column {column.name} in stream {current_part.stream_name} references fields {columns_missing_from_join} in stream {referenced_stream_name}, but they were not provided")
|
601
|
+
current_part.columns.remove(column)
|
602
|
+
columns_removed = True
|
603
|
+
break
|
604
|
+
else:
|
605
|
+
if part != current_part:
|
606
|
+
stack.append((part, current_joined_parts))
|
607
|
+
|
608
|
+
return columns_removed
|
604
609
|
|
605
610
|
class JsonSchemaTopLevel(BaseModel):
|
606
611
|
"""
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.10.11a262 → omnata_plugin_runtime-0.10.12}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|