TDL-21114 add tags property for submitted_landings stream#75
TDL-21114 add tags property for submitted_landings stream#75kethan1122 merged 8 commits intomasterfrom
Conversation
| "tags": { | ||
| "type": [ | ||
| "array", | ||
| "null" | ||
| ], | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, |
There was a problem hiding this comment.
| "tags": { | |
| "type": [ | |
| "array", | |
| "null" | |
| ], | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "tags": { | |
| "type": [ | |
| "null", | |
| "array" | |
| ], | |
| "items": { | |
| "type": [ | |
| "null", | |
| "string" | |
| } | |
| }, |
tap_typeform/streams.py
Outdated
| Add additional data and nested fields to top level | ||
| """ | ||
| record.update({ | ||
| "tags": record["tags"] if "tags" in record else [], |
There was a problem hiding this comment.
If "tags" doesn't exist on the record we should return None, not an empty list. Changing this to record.get("tags") would work.
There was a problem hiding this comment.
ok.. in that case is it necessary to have null as data type here ?
There was a problem hiding this comment.
yes, we should leave the null option in the schema
| "tags": { | ||
| "type": [ | ||
| "null", | ||
| "array" | ||
| ], | ||
| "items": { | ||
| "type": [ | ||
| "null", | ||
| "string" | ||
| ] | ||
| } | ||
| }, |
There was a problem hiding this comment.
I didn't realise it earlier but to keep pattern uniform, can we write schema on the same line?
Otherwise it looks good.
| "tags": { | ||
| "type": ["null", "array"], | ||
| "items": { | ||
| "type": ["string"] |
There was a problem hiding this comment.
I think you misunderstood my last comment, the null should remain in the schema. That will allow null values to persisted if there are any. As it is written here if a null was returned by the API the transformer would throw an error.
Description of change
Duplicates #68
Manual QA steps
Risks
Rollback steps