omnata-plugin-runtime 0.10.30a292__tar.gz → 0.10.31a295__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.30a292 → omnata_plugin_runtime-0.10.31a295}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/json_schema.py +9 -3
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/LICENSE +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/README.md +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.10.30a292 → omnata_plugin_runtime-0.10.31a295}/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.31-a295"
|
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"
|
@@ -191,11 +191,17 @@ class SnowflakeViewColumn(BaseModel):
|
|
191
191
|
self.referenced_columns
|
192
192
|
)
|
193
193
|
|
194
|
-
def definition(self,original_name:bool = False) -> str:
|
194
|
+
def definition(self,original_name:bool = False, remove_stream_prefix:Optional[str] = None) -> str:
|
195
195
|
"""
|
196
196
|
Returns the column definition for a normalized view.
|
197
197
|
If original_name is True, the original name will be used instead of the transformed name.
|
198
198
|
"""
|
199
|
+
if remove_stream_prefix is not None and self.referenced_columns is not None:
|
200
|
+
if remove_stream_prefix in self.referenced_columns:
|
201
|
+
for referenced_column in self.referenced_columns[remove_stream_prefix]:
|
202
|
+
replace_source = f'"{remove_stream_prefix}"."{referenced_column}"'
|
203
|
+
replace_target = f'"{referenced_column}"'
|
204
|
+
self.expression = self.expression.replace(replace_source, replace_target)
|
199
205
|
if original_name:
|
200
206
|
return f'{self.expression} as "{self.original_name}"'
|
201
207
|
return f'{self.expression} as "{self.name}"'
|
@@ -456,11 +462,11 @@ class SnowflakeViewPart(BaseModel):
|
|
456
462
|
"""
|
457
463
|
if include_only_columns is None:
|
458
464
|
return f""" "{self.stream_name}" as (
|
459
|
-
select {', '.join([c.definition(original_name=original_name) for c in self.direct_columns()])}
|
465
|
+
select {', '.join([c.definition(original_name=original_name,remove_stream_prefix=self.stream_name) for c in self.direct_columns()])}
|
460
466
|
from {self.raw_table_location.get_fully_qualified_name()}
|
461
467
|
) """
|
462
468
|
return f""" "{self.stream_name}" as (
|
463
|
-
select {', '.join([c.definition(original_name=original_name) for c in self.columns
|
469
|
+
select {', '.join([c.definition(original_name=original_name,remove_stream_prefix=self.stream_name) for c in self.columns
|
464
470
|
if c.original_name in include_only_columns])}
|
465
471
|
from {self.raw_table_location.get_fully_qualified_name()}
|
466
472
|
) """
|
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
|