target-bigquery icon indicating copy to clipboard operation
target-bigquery copied to clipboard

Edge case for object properties with empty schemas

Open rubenvereecken opened this issue 2 months ago • 0 comments

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.

rubenvereecken avatar Apr 29 '24 13:04 rubenvereecken