Fix #1550: Metadata ingestion errors from Azure Data Lake (#21261)

(cherry picked from commit 9ec424a3fad0f885861a1324b393a7eba71bd134)
This commit is contained in:
Mayur Singal 2025-05-19 11:44:19 +05:30 committed by OpenMetadata Release Bot
parent ebe397d041
commit ac6f726252

View File

@ -35,7 +35,11 @@ def _get_json_text(key: str, text: bytes, decode: bool) -> Union[str, bytes]:
with zipfile.ZipFile(io.BytesIO(text)) as zip_file:
processed_text = zip_file.read(zip_file.infolist()[0])
if decode:
return processed_text.decode(UTF_8) if isinstance(text, bytes) else text
return (
processed_text.decode(UTF_8, errors="ignore")
if isinstance(text, bytes)
else text
)
return processed_text