Skip to content

Commit

Permalink
Merge pull request #222 from DataRecce/feature/drc-285-table-schema-a…
Browse files Browse the repository at this point in the history
…re-not-parsed-properly

[Bug] Fix the schema diff column name is wrong
  • Loading branch information
popcornylu authored Mar 11, 2024
2 parents 2226c10 + 5a21906 commit 40a8275
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recce/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def get_lineage(self, base: Optional[bool] = False):
cols_unique.append(child_name[len(unique_prefix):])

if catalog is not None and unique_id in catalog.nodes:
columns = []
columns = {}
primary_key = None
for col_name, col in catalog.nodes[unique_id].columns.items():
col = dict(name=col_name, type=col.type)
Expand All @@ -323,7 +323,7 @@ def get_lineage(self, base: Optional[bool] = False):
col['unique'] = True
if not primary_key:
primary_key = col_name
columns.append(col)
columns[col_name] = col
nodes[unique_id]['columns'] = columns
if primary_key:
nodes[unique_id]['primary_key'] = primary_key
Expand Down

0 comments on commit 40a8275

Please sign in to comment.