Database Reference
In-Depth Information
Figure 4.5 Nested BigQuery schema
Tables
Tables in BigQuery are similar to tables in a relational database-they are
collections of rows and columns of structured data. Being structured means
they have a schema, which applies to all the data in the table. BigQuery
supports nested schemas, meaning you can have a row of data that has
arrays of values or nested records. Table schemas are generally specified
when the table is created and can be updated only in limited ways. The
Tables.update() API method enables you to add new columns to the
table and to relax REQUIRED fields to make them NULLABLE .
BigQuery tables do not support row-level updates. Tables can be appended
to, so they can continue growing after they are created. Appending may be
useful if you have data being generated periodically; you can add to the
table as new results come in. Tables can also be truncated, which means
that a single atomic operation can delete them and replace them with new
data. The truncate operation is useful, for example, if you mirror data from
an external data store and want to always replace the table with the latest
version.
Query results in BigQuery are themselves tables. Any operation you can
perform on a BigQuery table can be performed on a query result. By default,
query results are “anonymous,” meaning they are given a random name
belonging to a hidden dataset and will expire after 24 hours. However,
queries can also specify named destination tables, in which case the results
will stick around until the destination tables are deleted.
 
Search WWH ::




Custom Search