dean_morin
04/21/2021, 11:43 PMtap-postgres and target-snowflake and am having some issues with how certain data types are being handled.
My test postgres database has a single table that has columns that include types text[] and json. This caused my run to fail with:
'`schema` is an invalid JSON Schema instance: {"type": "SCHEMA", "stream": "things-employees", "schema": {"type": "object", "properties": {"id": {"type": ["null", "string"]}, "first_name": {"type": ["null", "string"]}, "last_name": {"type": ["null", "string"]}, "salary": {"type": ["null", "number"], "exclusiveMaximum": true, "maximum": 10000000000, "multipleOf": 0.01, "exclusiveMinimum": true, "minimum": -10000000000}, "roles": {"type": ["null", "array"], "items": {"$ref": "#/definitions/sdc_recursive_string_array"}}, "config": {"type": ["null", "object", "array"]}, "updated_at": {"type": ["null", "string"], "format": "date-time"}}, "definitions": {"sdc_recursive_integer_array": {"type": ["null", "integer", "array"], "items": {"$ref": "#/definitions/sdc_recursive_integer_array"}}, "sdc_recursive_number_array": {"type": ["null", "number", "array"], "items": {"$ref": "#/definitions/sdc_recursive_number_array"}}, "sdc_recursive_string_array": {"type": ["null", "string", "array"], "items": {"$ref": "#/definitions/sdc_recursive_string_array"}}, "sdc_recursive_boolean_array": {"type": ["null", "boolean", "array"], "items": {"$ref": "#/definitions/sdc_recursive_boolean_array"}}, "sdc_recursive_timestamp_array": {"type": ["null", "string", "array"], "format": "date-time", "items": {"$ref": "#/definitions/sdc_recursive_timestamp_array"}}, "sdc_recursive_object_array": {"type": ["null", "object", "array"], "items": {"$ref": "#/definitions/sdc_recursive_object_array"}}}}, "key_properties": [], "bookmark_properties": []}\n', '`$ref` path "{\'type\': [\'null\', \'string\', \'array\'], \'items\': {\'$ref\': \'#/definitions/sdc_recursive_string_array\'}}" is recursive'
I dropped these two columns (didn’t test yet to see which was the problem) and then my run completed successfully. However there is a second issue. The salary column is of type float in snowflake rather than number(12,2) which would better match the source type.
Is there a way to work with text[]/json (whichever is causing the issue), and to specify the mapping of source to destination data type? Or would switching to one of the other tap/target variants help?aaronsteers
04/22/2021, 12:52 AMaaronsteers
04/22/2021, 1:27 AMdean_morin
04/22/2021, 6:43 PMfile_format is meant to be in the transferwise target-snowflake, but I’m also very new to Snowflake so I’m going to read through the SF docs and see if that clears anything upaaronsteers
04/22/2021, 8:46 PM