omnata-plugin-runtime 0.10.6a244__tar.gz → 0.10.6a246__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.10.6a244
3
+ Version: 0.10.6a246
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "omnata-plugin-runtime"
3
- version = "0.10.6-a244"
3
+ version = "0.10.6-a246"
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"
@@ -429,7 +429,12 @@ class SnowflakeViewParts(BaseModel):
429
429
  # we need a final CTE which selects the main part's direct columns and joined columns, with their original names
430
430
  # then the final select statement will just be aliasing to the transformed names
431
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()])}
432
+ select {', '.join(
433
+ [
434
+ f'"{c.original_name}"' for c in self.main_part.direct_columns()
435
+ ]+[
436
+ c.definition(original_name=True) for c in self.main_part.join_columns()
437
+ ])}
433
438
  from "{self.main_part.stream_name}"
434
439
  ) """
435
440
  ctes.append(final_cte)
@@ -441,7 +446,7 @@ class SnowflakeViewParts(BaseModel):
441
446
 
442
447
  view_body = f"""with {all_ctes}
443
448
  select {', '.join(column_clauses)}
444
- from "{self.main_part.stream_name}" """
449
+ from OMNATA_FINAL_CTE """
445
450
  if len(self.main_part.joins) > 0:
446
451
  join_clauses = [join.definition() for join in self.main_part.joins]
447
452
  view_body += "\n" + ("\n".join(join_clauses))