Skip to content

Commit

Permalink
GEN-1251: Fix Expected ColumnLineage but got dict (#17708)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 authored and SumanMaharana committed Oct 3, 2024
1 parent 031a6be commit 84441c4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ingestion/src/metadata/ingestion/ometa/mixins/lineage_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from metadata.generated.schema.api.lineage.addLineage import AddLineageRequest
from metadata.generated.schema.entity.services.databaseService import DatabaseService
from metadata.generated.schema.type.basic import FullyQualifiedEntityName, Uuid
from metadata.generated.schema.type.entityLineage import EntitiesEdge
from metadata.generated.schema.type.entityLineage import ColumnLineage, EntitiesEdge
from metadata.generated.schema.type.entityReference import EntityReference
from metadata.ingestion.lineage.models import ConnectionTypeDialectMapper
from metadata.ingestion.lineage.parser import LINEAGE_PARSING_TIMEOUT
Expand Down Expand Up @@ -139,6 +139,18 @@ def add_lineage(
)
)

serialized_col_details = []
for col_lin in data.edge.lineageDetails.columnsLineage or []:
serialized_col_details.append(ColumnLineage(**col_lin))
data.edge.lineageDetails.columnsLineage = serialized_col_details

serialized_col_details_og = []
for col_lin in original.edge.lineageDetails.columnsLineage or []:
serialized_col_details_og.append(ColumnLineage(**col_lin))
original.edge.lineageDetails.columnsLineage = (
serialized_col_details_og
)

# Keep the pipeline information from the original
# lineage if available
if (
Expand Down

0 comments on commit 84441c4

Please sign in to comment.