omnata-plugin-runtime 0.10.6a235__py3-none-any.whl → 0.10.6a237__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.
@@ -181,6 +181,9 @@ class SnowflakeViewColumn(BaseModel):
181
181
  if original_name:
182
182
  return f'{self.expression} as "{self.original_name}"'
183
183
  return f'{self.expression} as "{self.name}"'
184
+
185
+ def original_to_transformed(self) -> str:
186
+ return f'"{self.original_name}" as "{self.name}"'
184
187
 
185
188
  def name_with_comment(self,binding_list:Optional[List[Any]] = None) -> str:
186
189
  """
@@ -426,8 +429,8 @@ class SnowflakeViewParts(BaseModel):
426
429
  all_ctes = "\n,".join(ctes)
427
430
  direct_columns = self.main_part.direct_columns()
428
431
  join_columns = self.main_part.join_columns()
429
- direct_column_clauses = [c.definition(original_name=True) for c in direct_columns]
430
- join_column_clauses = [c.definition(original_name=False) for c in join_columns]
432
+ direct_column_clauses = [f"\"{self.main_part.stream_name}\"."+c.original_to_transformed() for c in direct_columns]
433
+ join_column_clauses = [c.definition() for c in join_columns]
431
434
  # the joined columns may reference the direct columns, so we need to order them correctly
432
435
  final_column_clauses = direct_column_clauses + join_column_clauses
433
436
  view_body = f"""with {all_ctes}
@@ -599,6 +602,7 @@ def normalized_view_part(
599
602
  snowflake_columns.append(
600
603
  SnowflakeViewColumn(
601
604
  name="OMNATA_APP_IDENTIFIER",
605
+ original_name="OMNATA_APP_IDENTIFIER",
602
606
  expression="APP_IDENTIFIER",
603
607
  comment="The value of the unique identifier for the record in the source system",
604
608
  )
@@ -606,6 +610,7 @@ def normalized_view_part(
606
610
  snowflake_columns.append(
607
611
  SnowflakeViewColumn(
608
612
  name="OMNATA_RETRIEVE_DATE",
613
+ original_name="OMNATA_RETRIEVE_DATE",
609
614
  expression="RETRIEVE_DATE",
610
615
  comment="The date and time the record was retrieved from the source system",
611
616
  )
@@ -613,6 +618,7 @@ def normalized_view_part(
613
618
  snowflake_columns.append(
614
619
  SnowflakeViewColumn(
615
620
  name="OMNATA_RAW_RECORD",
621
+ original_name="OMNATA_RAW_RECORD",
616
622
  expression="RECORD_DATA",
617
623
  comment="The raw semi-structured record as retrieved from the source system",
618
624
  )
@@ -620,6 +626,7 @@ def normalized_view_part(
620
626
  snowflake_columns.append(
621
627
  SnowflakeViewColumn(
622
628
  name="OMNATA_IS_DELETED",
629
+ original_name="OMNATA_IS_DELETED",
623
630
  expression="IS_DELETED",
624
631
  comment="A flag to indicate that the record was deleted from the source system",
625
632
  )
@@ -627,6 +634,7 @@ def normalized_view_part(
627
634
  snowflake_columns.append(
628
635
  SnowflakeViewColumn(
629
636
  name="OMNATA_RUN_ID",
637
+ original_name="OMNATA_RUN_ID",
630
638
  expression="RUN_ID",
631
639
  comment="A flag to indicate which run the record was last processed in",
632
640
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.10.6a235
3
+ Version: 0.10.6a237
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -2,12 +2,12 @@ omnata_plugin_runtime/__init__.py,sha256=MS9d1whnfT_B3-ThqZ7l63QeC_8OEKTuaYV5wTw
2
2
  omnata_plugin_runtime/api.py,sha256=baGraSMiD4Yvi3ZWrEv_TKh8Ktd1U8riBdOpe9j0Puw,8202
3
3
  omnata_plugin_runtime/configuration.py,sha256=fpSyBr3Dr7GNdil88915VtMwRy5pexkGCRBk7BLFpPs,46527
4
4
  omnata_plugin_runtime/forms.py,sha256=9YHJ_T17lT-rwyDaUg_0yj_YMPda4DRCw_wrvf8hE0E,19964
5
- omnata_plugin_runtime/json_schema.py,sha256=DB4bLNQ3mDvB8G0EQY2RiPwTe3H_PQKxa61ryTbpyEQ,29481
5
+ omnata_plugin_runtime/json_schema.py,sha256=yCoiN8GgX1nF1g1jhs07CE3zgGE4W70LxQnBKT05WAE,29861
6
6
  omnata_plugin_runtime/logging.py,sha256=WBuZt8lF9E5oFWM4KYQbE8dDJ_HctJ1pN3BHwU6rcd0,4461
7
7
  omnata_plugin_runtime/omnata_plugin.py,sha256=M0b6f9lKKEoEI0zf-ZwZcIPKPQTmHTIMhvcrBc94Mhg,133278
8
8
  omnata_plugin_runtime/plugin_entrypoints.py,sha256=iqGl8_nEEnPGKg3Aem4YLSQ6d5xS3ju5gq8MJbx6sCA,31968
9
9
  omnata_plugin_runtime/rate_limiting.py,sha256=qpr5esU4Ks8hMzuMpSR3gLFdor2ZUXYWCjmsQH_K6lQ,25882
10
- omnata_plugin_runtime-0.10.6a235.dist-info/LICENSE,sha256=rGaMQG3R3F5-JGDp_-rlMKpDIkg5n0SI4kctTk8eZSI,56
11
- omnata_plugin_runtime-0.10.6a235.dist-info/METADATA,sha256=CPI4nTz1LjXxvTejYOvdNe54rs-l8WEklh8e5H_C11c,2211
12
- omnata_plugin_runtime-0.10.6a235.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
13
- omnata_plugin_runtime-0.10.6a235.dist-info/RECORD,,
10
+ omnata_plugin_runtime-0.10.6a237.dist-info/LICENSE,sha256=rGaMQG3R3F5-JGDp_-rlMKpDIkg5n0SI4kctTk8eZSI,56
11
+ omnata_plugin_runtime-0.10.6a237.dist-info/METADATA,sha256=Rtl6p_TLzda6Hwa4hjtwa5G3NfeTcpZx2E9uglne1Kg,2211
12
+ omnata_plugin_runtime-0.10.6a237.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
13
+ omnata_plugin_runtime-0.10.6a237.dist-info/RECORD,,