-
Notifications
You must be signed in to change notification settings - Fork 76
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
ValidationError if column value is 1 or 2 #178
Comments
@davicorreiajr that is bizarre, but I imagine that has something to do with floating point error/binary number gaps? Our code doesn't actually do those checks, that's Python's implementation of JSONSchema (we try to do as little data munging when validating the schema against the records we ingest). This looks very similar: python-jsonschema/jsonschema#247 |
Another postgres target with the same issue, possible solution: |
@djdevin ah, interesting. I think the best way to solve this, with the smallest footprint is prolly just to use the suggestion straight from the Python JSON docs: >>> import decimal
>>> json.loads('1.1', parse_float=decimal.Decimal)
Decimal('1.1') With that sort of change, handling this issue might be trivial. |
If someone wants to put up a PR for the above which adds a test for the original problem AND uses the simple |
Nice, thanks guys! @AlexanderMann I'll try and do it. |
This just needs to be deployed now. Will close once deployed. |
I'm having a weird issue: whenever the column value is 1 or 2, I get the following error:
It's weird that I get the error for 1 or 2, but from 3 on it seems to work.
If it helps, the generated schema for this column is:
I'm using
target-postgres
along withtap-google-sheets
.The text was updated successfully, but these errors were encountered: