Skip to content

Commit

Permalink
fix(ingest): preserve dbt column name casing
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Jan 18, 2023
1 parent a3f4c40 commit 34c3a58
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,20 @@ def get_columns(
catalog_columns = catalog_node["columns"]
manifest_columns = manifest_node.get("columns", {})

manifest_columns_lower = {k.lower(): v for k, v in manifest_columns.items()}

for key, catalog_column in catalog_columns.items():
manifest_column = manifest_columns.get(key.lower(), {})
manifest_column = manifest_columns.get(
key, manifest_columns_lower.get(key.lower(), {})
)

meta = manifest_column.get("meta", {})

tags = manifest_column.get("tags", [])
tags = [tag_prefix + tag for tag in tags]

dbtCol = DBTColumn(
name=catalog_column["name"].lower(),
name=catalog_column["name"],
comment=catalog_column.get("comment", ""),
description=manifest_column.get("description", ""),
data_type=catalog_column["type"],
Expand Down

0 comments on commit 34c3a58

Please sign in to comment.