Method: tables.list

Lists all tables in the specified dataset. Requires the READER dataset role.

HTTP request

GET https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
projectId

string

Project ID of the tables to list

datasetId

string

Dataset ID of the tables to list

Query parameters

Parameters
maxResults

number

The maximum number of results to return

pageToken

string

Page token, returned by a previous call, to request the next page of results

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "etag": string,
  "nextPageToken": string,
  "tables": [
    {
      "kind": string,
      "id": string,
      "tableReference": {
        "projectId": string,
        "datasetId": string,
        "tableId": string
      },
      "friendlyName": {
        "value": string
      },
      "type": string,
      "timePartitioning": {
        "type": string,
        "expirationMs": string,
        "field": string,
        "requirePartitionFilter": boolean
      },
      "clustering": {
        "fields": [
          string
        ]
      },
      "labels": {
        "key": string,
        "value": string
      },
      "view": {
        "useLegacySql": boolean
      },
      "creationTime": string,
      "expirationTime": string
    }
  ],
  "totalItems": number
}
Fields
kind

string

The type of list.

etag

string

A hash of this page of results.

nextPageToken

string

A token to request the next page of results.

tables[]

object

Tables in the requested dataset.

tables[].kind

string

The resource type.

tables[].id

string

An opaque ID of the table.

tables[].tableReference

object (TableReference)

A reference uniquely identifying table.

tables[].friendlyName

string

The user-friendly name for this table.

tables[].type

string

The type of table.

tables[].timePartitioning

object (TimePartitioning)

The time-based partitioning for this table.

tables[].clustering

object (Clustering)

[TrustedTester] Clustering specification for this table, if configured.

tables[].labels

map (key: string, value: string)

The labels associated with this table. You can use these to organize and group your tables.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

tables[].view

object

Additional details for a view.

tables[].view.useLegacySql

boolean

True if view is defined in legacy SQL dialect, false if in standard SQL.

tables[].creationTime

string (int64 format)

Output only. The time when this table was created, in milliseconds since the epoch.

tables[].expirationTime

string (int64 format)

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.

totalItems

number

The total number of tables in the dataset.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/bigquery
  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/bigquery.readonly
  • https://www.googleapis.com/auth/cloud-platform.read-only

For more information, see the Authentication Overview.

Try it!

このページは役立ちましたか?評価をお願いいたします。

フィードバックを送信...