Skip to content

Commit

Permalink
fix(ingest): preserve dbt column name casing (datahub-project#7063)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored and shirshanka committed Jan 18, 2023
1 parent 07919a1 commit 5358f29
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 5358f29

Please sign in to comment.