4
votes

In bigquery, is there a way to set data fields to nullable through browser interface?

If not, and I have a mix of integers and NULL values in a column, will the bigquery accept type 'integer' for that field or will it require 'string'?

Thanks

1

1 Answers

5
votes

Update (2016-07-06): You can now edit field modes and add new fields to schemas in the web UI's schema view.


The browser interface does not currently have a way to directly update the schema of an existing table. If you're creating a new table, though, you'll get nullable fields by default.

I'm not sure I understand your second question. A mix of integers and NULL values will work fine for a field with "integer" type and "nullable" node, but not if the mode is "required" (since this disallows NULL values). You could choose to represent all of this data as string data, but that would be less efficient and less convenient to query.

Note that when importing data as CSV, NULL values are represented by an empty field, not by the string "NULL".