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 Sep 9, 2024
1 parent 0c510e4 commit 9107c41
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 @@ -22,7 +22,7 @@

from metadata.generated.schema.api.lineage.addLineage import AddLineageRequest
from metadata.generated.schema.entity.services.databaseService import DatabaseService
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 @@ -138,6 +138,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 9107c41

Please sign in to comment.