-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ingest/pulsar): handle missing/invalid schema objects #11945
fix(ingest/pulsar): handle missing/invalid schema objects #11945
Conversation
Fix schema parsing issue in Pulsar ingestion Problem Description: Fix Description: Added validation for schema.get("data") to ensure it is not None or empty before attempting JSON parsing. datahub/metadata-ingestion/src/datahub/ingestion/source/pulsar.py: Added validation for schema data and exception handling for JSONDecodeError. Fixes: #11945 Testing Done: Schema data that is None or invalid no longer causes the ingestion process to fail. Impact: |
avro_schema = json.loads(schema_data) | ||
except JSONDecodeError as e: | ||
avro_schema = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have better error reporting for this - we should emit a warning for this
That warning should be part of the source report (e.g. source.report.warning(...)
). We never use print
in our codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah,I have modified it once according to the prompt,tks
…alarm method to facilitate users to know
… into master-fix-schema-parsing-issue
yeah,I have modified it once according to the prompt |
…alarm method to facilitate users to know
… into master-fix-schema-parsing-issue
Checklist