Skip to content

BigQuery: Look at more objects of an array for type inference #50

@sqlrob

Description

@sqlrob

When generating a schema for BigQuery, only the first member of the array is looked at for schema generation. If this object contains optional fields, looking at one member may not be sufficient.

If you generate a schema from the following object, and then try to insert that object with the options {ignoreUnknownValues: false}, it fails.

{
  arrayField: [ { snafu: true }, { snafu: true, foobar: true } 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions