Skip to content

Commit

Permalink
Merge pull request #76 from syou6162/enhance_nested_column_treatment
Browse files Browse the repository at this point in the history
Allow to keep root level column name that contains nested fields
  • Loading branch information
z3z1ma authored Aug 3, 2023
2 parents 14f96f2 + a011d79 commit 308494a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/dbt_osmosis/core/osmosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,10 @@ def get_columns(self, parts: Tuple[str, str, str]) -> List[str]:
)
return columns
try:
columns = [
self.column_casing(exp.name)
for c in self.adapter.get_columns_in_relation(table)
for exp in getattr(c, "flatten", lambda: [c])()
]
for c in self.adapter.get_columns_in_relation(table):
columns.append(self.column_casing(c.name))
if hasattr(c, "flatten"):
columns.extend([self.column_casing(exp.name) for exp in c.flatten()])
except Exception as error:
logger().info(
(
Expand Down

0 comments on commit 308494a

Please sign in to comment.