Skip to content

Commit

Permalink
logs(ingestion/unity): Hide stack trace on sql parse failure logs (da…
Browse files Browse the repository at this point in the history
  • Loading branch information
asikowitz committed Aug 23, 2023
1 parent 24f56f1 commit f218d3e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions metadata-ingestion/src/datahub/ingestion/source/unity/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ def _parse_query_via_lineage_runner(self, query: str) -> Optional[StringTableInf
for table in runner.target_tables
],
)
except Exception:
logger.info(
f"Could not parse query via lineage runner, {query}", exc_info=True
)
except Exception as e:
logger.info(f"Could not parse query via lineage runner, {query}: {e!r}")
return None

@staticmethod
Expand All @@ -202,8 +200,8 @@ def _parse_query_via_spark_sql_plan(self, query: str) -> Optional[StringTableInf
return GenericTableInfo(
source_tables=[t for t in tables if t], target_tables=[]
)
except Exception:
logger.info(f"Could not parse query via spark plan, {query}", exc_info=True)
except Exception as e:
logger.info(f"Could not parse query via spark plan, {query}: {e!r}")
return None

@staticmethod
Expand Down

0 comments on commit f218d3e

Please sign in to comment.