Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEN-1251: Fix Expected ColumnLineage but got dict #17708

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading