I'm getting this error `jsonschema.exceptions.Vali...
# troubleshooting
i
I'm getting this error
jsonschema.exceptions.ValidationError: Decimal('-0.0033000000000000004') is not a multiple of 1E-17
when trying to run tap-mssql target-snowflake. What is causing this? Do float type numbers just cause issues like this?
v
this is a json schema validation problem, definitely fixable but it's most likely a target issue. There's some things you have to add to get decimals to work properly when they have high precision One fix is to turn off json schema validation on the target most targets support this
On a target I wrote I just set decimal.getcontext().prec = precision to a very large number and haven't hit an issue since 🤷
i
Hmm so how could I do that on a pre-written target?
I'm using snowflake
Copy code
Validate Records (validate_records)

Environment variable: TARGET_SNOWFLAKE_VALIDATE_RECORDS
Default Value: false
Validate every single record message to the corresponding JSON schema. This option is disabled by default and invalid RECORD messages will fail only at load time by Snowflake. Enabling this option will detect invalid records earlier but could cause performance degradation.
I see that for the transferwise variant there's this setting. Is this what I'm looking for? I'm currently using the default snowflake target
1
h
this would be a good test case to add to the sdk (validate target can handle high precision decimals)
i'll make an issue.
🙏 1
i
@visch Setting 'validate records: false' worked by the way thank you
❤️ 1