Arrays¶
BigQuery allows you to create columns of arrays. For example, if you have a table of vehicles, you might want to include a tags column, so that each vehicle can have zero or more arbitrary tags.
See the code to build this table
Arrays can be an efficient way to store and query data, as they reduce the need to join tables. In the vehicles table above, we could fetch vehicles with a moon roof like so
Array Notes¶
- When you have a column of arrays, each array must have the same type (e.g. INT, FLOAT, STRING)
- You can't have an array of arrays