MINOR: Fix table not found error (#18560)

This commit is contained in:
Mayur Singal 2024-11-09 20:33:32 +05:30 committed by GitHub
parent 7f5f47f618
commit b02c64931e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -341,10 +341,12 @@ def _create_lineage_by_table_name(
(to_table, to_table_entities),
):
if entity is None:
raise RuntimeError(f"Table entity not found: [{table_name}]")
logger.debug(
f"WARNING: Table entity [{table_name}] not found in OpenMetadata"
)
for from_entity, to_entity in itertools.product(
from_table_entities, to_table_entities
from_table_entities or [], to_table_entities or []
):
if to_entity and from_entity:
yield _build_table_lineage(

View File

@ -96,9 +96,7 @@ def test_log_lineage(
workflow = run_workflow(
MetadataWorkflow, log_lineage_config, raise_from_status=False
)
assert len(workflow.source.status.failures) == 2
for failure in workflow.source.status.failures:
assert "Table entity not found" in failure.error
assert len(workflow.source.status.failures) == 0
customer_table: Table = metadata.get_by_name(
Table,
f"{db_service.fullyQualifiedName.root}.dvdrental.public.customer",