Fix for validation issue with decimal numbers#2
Fix for validation issue with decimal numbers#2micaelbergeron merged 1 commit intomeltano:masterfrom
Conversation
| schemas[stream] = o | ||
| validators[stream] = Draft4Validator(o['schema']) | ||
| schema = float_to_decimal(o['schema']) | ||
| validators[stream] = Draft4Validator(schema, format_checker=FormatChecker()) |
There was a problem hiding this comment.
@koszti why do we specifically need a FormatChecker now?
There was a problem hiding this comment.
@micaelbergeron It doesn't look like it's actually necessary, since it concerns the format property and has nothing to do with decimals or multipleOf, but I don't think it hurts to keep it either.
Koszti may just have accidentally included two unrelated fixes at the same time when he submitted cubedevinc#11. This FormatChecker is still present in https://github.com/transferwise/pipelinewise-target-postgres/blob/master/target_postgres/__init__.py#L136, so we're probably OK keeping it here too.
I'm more than happy to submit a new PR that doesn't apply this change, though, if you prefer.
|
@micaelbergeron We just ran into this ourselves in https://gitlab.com/meltano/meltano/issues/1783#note_293619781! Can you please merge this PR? :) |
Applying fixes for validation error from koszti [https://github.com/koszti/target-postgres/tree/fix/multipleOf-validation-error].
For more detail, see Issues with floats in target-postgres.