Skip to content
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

Add check to disable validate_records, add support unsigned number using minLength #170

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vietvudanh
Copy link

Meltano SDK has config validate_records to disable records validation. However when it is set to false, self._validator is None, cause the sink flow raise error.

This PR add a simple check to skip running validate when the flag is False.

@vietvudanh vietvudanh marked this pull request as draft June 20, 2024 10:39
Comment on lines 180 to 181
if self.validate_schema:
self._validator.validate(record)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to convert this whole try-except block into return super()._validate_and_parse(record)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, only now I have time look at the parent method, looks identical. I was in rush to fix on prod yesterday so didn't read everything. Thank @edgarrmondragon for the suggestion.

@vietvudanh vietvudanh changed the title Add check to disable validate_records Add check to disable validate_records, add support unsigned number using minLength Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants