target-bigquery
target-bigquery copied to clipboard
Edge case for object properties with empty schemas
I ran into issues with properties that had the following type
{'items': {'type': 'object'}, 'type': ['null', 'array']}
because BQ was expecting a schema for the objects, but target-bigquery
was generating an empty schema RECORD
type.
This PR changes that to a JSON
type if there's nothing to base a schema on, in line with the general assumption that JSON is a good fallback.
Should break nothing, as hitting this edge case produces errors without this PR.