Skip to content

Commit

Permalink
Update airflow/providers/openlineage/utils/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Kacper Muda <[email protected]>
  • Loading branch information
anandhimurali and kacpermuda authored May 21, 2024
1 parent 03ed172 commit 79a6b16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airflow/providers/openlineage/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ def get_custom_facets(task_instance: TaskInstance | None = None) -> dict[str, An
for custom_facet_func in conf.custom_facet_functions():
func: type[function] | None = try_import_from_string(custom_facet_func)
if not func:
log.warning("Unable to import `%s`, will ignore it.", custom_facet_func)
facet = func(task_instance) if func else None
log.warning("OpenLineage is unable to import custom facet function `%s`; will ignore it.", custom_facet_func)
continue
facets: dict[str, BaseFacet] = func(task_instance)
if facet and isinstance(facet, dict):
duplicate_facet_keys = [facet_key for facet_key in facet.keys() if facet_key in custom_facets]
if duplicate_facet_keys:
Expand Down

0 comments on commit 79a6b16

Please sign in to comment.