You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
Schemas are required, but they can be defined in the broadest terms - a JSON Schema of '{}' validates all data points.
But right now, pipelinewise-target-snowflake would break if fed with SCHEMA messages that define an empty schema.
In my use case, the source was pipelinewise-tap-salesforce. In this tap, when salesforce defines a field with datatype anyType, like with History objects, the schema will be empty in singer.
This is a sample stream of messages generated by the salesforce tap:
It is possible to see in the SCHEMA message: "NewValue": {}, "OldValue": {}
When this sequence of message is piped to pipelinewise-target-snowflake, a KeyError exception is risen:
Traceback (most recent call last):
File "/home/vagrant/pipelinewise/.virtualenvs/target-snowflake/bin/target-snowflake", line 33, in <module>
sys.exit(load_entry_point('pipelinewise-target-snowflake', 'console_scripts', 'target-snowflake')())
File "/vagrant/pipelinewise-target-snowflake/target_snowflake/__init__.py", line 446, in main
persist_lines(config, singer_messages, table_cache)
File "/vagrant/pipelinewise-target-snowflake/target_snowflake/__init__.py", line 189, in persist_lines
adjust_timestamps_in_record(o['record'], schemas[stream])
File "/vagrant/pipelinewise-target-snowflake/target_snowflake/__init__.py", line 148, in adjust_timestamps_in_record
if 'string' in schema['properties'][key]['type'] and \
KeyError: 'type'
Proposed Solution
The proposed solution is to fix the bugs that cause the KeyError exceptions in the code, and at the same time implement a way to treat schemaless fields as snowflake Variant datatype.
The text was updated successfully, but these errors were encountered:
Current Issue
According to singer docs here
In my use case, the source was
pipelinewise-tap-salesforce
. In this tap, when salesforce defines a field with datatypeanyType
, like with History objects, the schema will be empty in singer.This is a sample stream of messages generated by the salesforce tap:
It is possible to see in the
SCHEMA
message:"NewValue": {}, "OldValue": {}
When this sequence of message is piped to
pipelinewise-target-snowflake
, aKeyError
exception is risen:Proposed Solution
The proposed solution is to fix the bugs that cause the
KeyError
exceptions in the code, and at the same time implement a way to treat schemaless fields as snowflakeVariant
datatype.The text was updated successfully, but these errors were encountered: