Forum Discussion
Hi @anayak
If you are able to load it as TEXT easiest fix would be in the mapper to use JSON.stringify(value) function. This function will convert your value into JSON string.
Also you can try to insert your records with “PostgreSQL - Bulk Load” or with “PostgreSQL - Execute” snaps.
Regards,
Pero Manchevski
I have tried JSON.stringify and Json.parse, the value is converted to JSON but not read as jsonb when run with Postgres-Insert snap. Will try bulk load and execute snaps instead. Thanks!
- dmiller8 years agoFormer Employee
I’ll let the Doc Team know.
- aleung8 years agoContributor III
I also didn’t quite understand the “required” function in the validate snap. You could use $[FIELD] != null in a filter snap instead to get the same effect.
- IgnatiusN8 years agoNew Contributor II
Thanks. We wanted to take advantage of the data validator snap’s error output ability. We ended up adding a mapper in front of the data validator snap to convert them to boolean strings (“true”/“false”) and using the pattern matching on data validator.
It would be good to have some clarity on how “Required” works. According to the documentation “Required” should work for all data types. We also tried to validate the date using “Type” validation for “date”, that didn’t work too.
The validator appears to be working good only for string types.