mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-19 06:28:03 +00:00
MINOR: Fix table not found error (#18560)
This commit is contained in:
parent
7f5f47f618
commit
b02c64931e
@ -341,10 +341,12 @@ def _create_lineage_by_table_name(
|
|||||||
(to_table, to_table_entities),
|
(to_table, to_table_entities),
|
||||||
):
|
):
|
||||||
if entity is None:
|
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(
|
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:
|
if to_entity and from_entity:
|
||||||
yield _build_table_lineage(
|
yield _build_table_lineage(
|
||||||
|
@ -96,9 +96,7 @@ def test_log_lineage(
|
|||||||
workflow = run_workflow(
|
workflow = run_workflow(
|
||||||
MetadataWorkflow, log_lineage_config, raise_from_status=False
|
MetadataWorkflow, log_lineage_config, raise_from_status=False
|
||||||
)
|
)
|
||||||
assert len(workflow.source.status.failures) == 2
|
assert len(workflow.source.status.failures) == 0
|
||||||
for failure in workflow.source.status.failures:
|
|
||||||
assert "Table entity not found" in failure.error
|
|
||||||
customer_table: Table = metadata.get_by_name(
|
customer_table: Table = metadata.get_by_name(
|
||||||
Table,
|
Table,
|
||||||
f"{db_service.fullyQualifiedName.root}.dvdrental.public.customer",
|
f"{db_service.fullyQualifiedName.root}.dvdrental.public.customer",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user