BigQuery - Tables



What are BigQuery Tables?

Tables are the foundational data source of BigQuery. BigQuery is a SQL data store, so data is stored in a structured (as opposed to unstructured or NoSQL) manner. BigQuery SQL tables are columnar, following a similar structure as a spreadsheet, with attributes or fields mapped to columns and records populating rows.

Unlike datasets, when creating a table, users do not have to specify a location.

Types of Tables in BigQuery

There are two important table types within BigQuery −

  • Standard tables (like any SQL-oriented table).
  • Views (a semi-permanent table that can be queried like a standard table).

Table Example

Table creation will be covered in a later chapter. In the meantime, however, it is helpful to recognize and identify the table types discussed above.

This is an example of a standard table

Bigquery Standard Table

Notably, users can see a metadata attribute, "Description", that immediately informs the developers and users what data the table contains.

View Example

Creating or having access to a table enables developers to build subsequent resources based on this data source. One table type you'll undoubtedly encounter and work with is a view.

This is how a view appears in BigQuery.

View Appears in BigQuery

Its schema and appearance in the UI is nearly identical to that of a standard table.

View Appears in BigQuery

Finally, views are created using a view definition, which is really just a materialized query.

Materialized Query
Advertisements