niall_woodward
09/16/2021, 9:10 PMprimary_keys = []
on a stream, which in the schema message is being emitted as "key_properties": null
, and breaking pipelinewise-target-snowflake
, which expects either no key or an empty list in this scenario. Some traces:
{
"type": "SCHEMA",
"stream": "relationship_strengths",
"schema": {
"properties": {
"internal_id": {
"type": [
"integer",
"null"
]
},
"external_id": {
"type": [
"integer",
"null"
]
},
"strength": {
"type": [
"number",
"null"
]
}
},
"type": "object"
},
"key_properties": null
}
target-snowflake | if len(stream_schema_message.get('key_properties', [])) > 0 else []
target-snowflake | TypeError: object of type 'NoneType' has no len()
I'm not sure if the problem here lies in my stream definition, the SDK, or the target. Any help would be gladly appreciated.aaronsteers
09/16/2021, 9:29 PM"key_properties": null
to be a bug, per se, I do think leaving off `"key_properties" entirely when missing or the empty set is a fine update to make if it improves compatibility with targets that have a specific expectation.aaronsteers
09/16/2021, 9:29 PMaaronsteers
09/16/2021, 9:32 PMkey_properties
to be present and null, presumably, that could influence our direction here. (I don't think this is the case though.)
• I definitely don't want the tap developer to have to care if they set primary_keys = null
vs primary_keys = []
vs leaving it omitted. Those three should be syntactically identical to any target downstream, so we should pick one and only one way to communicate "no primary keys".aaronsteers
09/16/2021, 9:32 PMniall_woodward
09/16/2021, 9:47 PMniall_woodward
09/16/2021, 9:47 PMniall_woodward
09/16/2021, 9:48 PMaaronsteers
09/16/2021, 9:51 PMniall_woodward
09/16/2021, 9:57 PMaaronsteers
09/16/2021, 10:05 PMniall_woodward
09/17/2021, 9:39 AM