Google BigQuery

Tables

A table is a part of a dataset. For more information, see Tables.

For a list of methods for this resource, see the end of this page.

Resource representations

{
  "kind": "bigquery#table",
  "etag": etag,
  "id": string,
  "selfLink": string,
  "tableReference": {
    "projectId": string,
    "datasetId": string,
    "tableId": string
  },
  "friendlyName": string,
  "description": string,
  "schema": {
    "fields": [
      {
        "name": string,
        "type": string,
        "mode": string,
        "fields": [
          (TableFieldSchema)
        ],
        "description": string
      }
    ]
  },
  "numBytes": long,
  "numRows": unsigned long,
  "creationTime": long,
  "expirationTime": long,
  "lastModifiedTime": long,
  "type": string,
  "view": {
    "query": string
  }
}
Property name Value Description Notes
creationTime long The time when this table was created, in milliseconds since the epoch.
description string [Optional] A user-friendly description of this table. writable
etag etag [Output-only] A hash of this resource.
expirationTime long [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
friendlyName string [Optional] A descriptive name for this table. writable
id string [Output-only] An opaque ID uniquely identifying the table.
kind bigquery#table The type of resource ID.
lastModifiedTime long [Output-only] The time when this table was last modified, in milliseconds since the epoch.
numBytes long [Output-only] The size of the table in bytes.
numRows unsigned long [Output-only] The number of rows of data in this table.
schema nested object [Optional] Describes the schema of this table. writable
schema.fields[] list Describes the fields in a table.
schema.fields[].description string [Optional] The field description.
schema.fields[].fields[] list [Optional] Describes the nested schema fields if the type property is set to RECORD.
schema.fields[].mode string [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
schema.fields[].name string [Required] The field name.
schema.fields[].type string [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
tableReference nested object An object that holds elements that identify this table.
tableReference.datasetId string [Required] The ID of the dataset that contains the table.
tableReference.projectId string [Required] The ID of the project that contains the table.
tableReference.tableId string [Required] The table ID.
type string [Output-only] Describes the table type. The following values are supported:

  • TABLE: A normal BigQuery table. 
  • VIEW: A virtual table defined by a SQL query. For more information, see views.
The default value is TABLE.
view nested object [Optional] The view definition. writable
view.query string [Required] A query that BigQuery executes when the view is referenced.

Methods

The following methods are supported:

delete
Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
get
Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
insert
Creates a new, empty table in the dataset.
list
Lists all tables in the specified dataset.
patch
Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.
update
Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.