-
Notifications
You must be signed in to change notification settings - Fork 15
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
Decimal to Float conversion in jsonschema causes validation error #14
Comments
Forgot to mention that open issue is for target-csv |
This one was interesting @walkabout21. I tried to get some decimal types from tap-mssql, but I don't think my decimals are the same as your decimals. The test-file (test singer records) I intercepted is here: https://github.com/radbrt/target-oracle/blob/decimaltypes/target_oracle/tests/data_files/decimal_types.singer (fyi, these are inserted as varchar) As you can see, there is no MultipleOf to be seen anywhere in there. Are you using the default |
I'm using the wintersrd variant. "course_mean":{"inclusion":"available","multipleOf":0.1,"type":["null","number"]} The value is defined as "course_mean":4.6 The column in sql server is defined as course_mean decimal(2,1) NULL, I'm not sure if this is an issue with the target handling the input or the tap not defining the sqlalchemy datatype properly. |
I did try testing this with the TARGET_ORACLE_PREFER_FLOAT_OVER_NUMERIC set to True, but it was the same result. |
Thanks for the details @walkabout21, I was able to reproduce the error by replacing the schema definition for yours: |
I did find a work around by setting the mssql-tap. use_singer_decimal value: true That setting exports number columns as strings. Without setting this, even after I set the stream_maps config to null for the decimal columns, I was still getting type errors saying the numbers had no n length attribute. |
@walkabout21 great to hear, and that explains why I couldn't reproduce it, for some reason I had set that one to true when I was testing. The Meltano Slack is full of discussions of the multipleOf issue, it seems this is not the only target that has issues with it. |
@radbrt should this issue stay open? There is a work around, but it's not ideal. Since this issue shows up in a number of targets is this really a meltano/singer issue? |
@walkabout21 I do think it it should ideally be handled elsewhere, but I do want to look into it more and hopefully find a decent workaround myself, so ot can just stay open. |
loading Decimal type from mssql server to oracle using tap-mssql and target-oracle throws jsonschema validation error
Most likely the change needs to be made here:
Similar to open issue here
Float-decimal validation issue
The text was updated successfully, but these errors were encountered: