Fixed lineage issue for double schema name (#4274)

This commit is contained in:
Onkar Ravgan 2022-04-20 16:33:36 +05:30 committed by GitHub
parent e64bed10b4
commit 093a146724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -245,3 +245,4 @@ class OMetaLineageMixin(Generic[T]):
except Exception as err:
logger.debug(str(err))
logger.error(f"Ingesting lineage failed")
return False

View File

@ -538,9 +538,12 @@ class MetadataRestSink(Sink[Entity]):
try:
parser = Parser(db_schema_and_table.table.viewDefinition.__root__)
to_table_name = db_schema_and_table.table.name.__root__
for from_table_name in parser.tables:
if "." not in from_table_name:
from_table_name = f"{db_schema.name.__root__}.{from_table_name}"
self.metadata._create_lineage_by_table_name(
f"{db_schema.name.__root__}.{from_table_name}",
from_table_name,
f"{db_schema.name.__root__}.{to_table_name}",
db.service.name,
db_schema_and_table.database.name.__root__,