Google BigQuery Tables API
Operations for managing tables within datasets
Operations for managing tables within datasets
openapi: 3.1.0
info:
title: Google BigQuery Datasets Tables API
description: The BigQuery API provides programmatic access to Google BigQuery for creating, managing, and querying datasets, tables, jobs, models, and routines. It enables developers to run SQL queries over petabytes of data, load and export data, manage access control, and orchestrate analytics workloads using serverless infrastructure.
version: '2'
contact:
name: Google Cloud Support
url: https://cloud.google.com/bigquery/docs/support
termsOfService: https://cloud.google.com/terms
servers:
- url: https://bigquery.googleapis.com/bigquery/v2
description: Production Server
security:
- oauth2: []
tags:
- name: Tables
description: Operations for managing tables within datasets
paths:
/projects/{projectId}/datasets/{datasetId}/tables:
get:
operationId: listTables
summary: Google BigQuery List tables
description: Lists all tables in the specified dataset.
tags:
- Tables
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/datasetId'
- $ref: '#/components/parameters/maxResults'
- $ref: '#/components/parameters/pageToken'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/TableList'
'401':
description: Unauthorized
'404':
description: Dataset not found
post:
operationId: insertTable
summary: Google BigQuery Create a table
description: Creates a new empty table in the specified dataset.
tags:
- Tables
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/datasetId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
'400':
description: Bad request
'401':
description: Unauthorized
'409':
description: Table already exists
/projects/{projectId}/datasets/{datasetId}/tables/{tableId}:
get:
operationId: getTable
summary: Google BigQuery Get table
description: Gets the specified table resource by table ID.
tags:
- Tables
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/datasetId'
- $ref: '#/components/parameters/tableId'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
'401':
description: Unauthorized
'404':
description: Table not found
patch:
operationId: patchTable
summary: Google BigQuery Partially update table
description: Updates information in an existing table, replacing only the fields provided in the submitted table resource.
tags:
- Tables
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/datasetId'
- $ref: '#/components/parameters/tableId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
'401':
description: Unauthorized
'404':
description: Table not found
delete:
operationId: deleteTable
summary: Google BigQuery Delete table
description: Deletes the table specified by tableId from the dataset.
tags:
- Tables
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/datasetId'
- $ref: '#/components/parameters/tableId'
responses:
'204':
description: Successfully deleted
'401':
description: Unauthorized
'404':
description: Table not found
components:
parameters:
datasetId:
name: datasetId
in: path
required: true
description: The ID of the dataset
schema:
type: string
tableId:
name: tableId
in: path
required: true
description: The ID of the table
schema:
type: string
pageToken:
name: pageToken
in: query
description: Page token for pagination
schema:
type: string
projectId:
name: projectId
in: path
required: true
description: The ID of the project
schema:
type: string
maxResults:
name: maxResults
in: query
description: Maximum number of results to return
schema:
type: integer
format: int32
schemas:
TableFieldSchema:
type: object
required:
- name
- type
properties:
name:
type: string
description: The field name
type:
type: string
description: The field data type
enum:
- STRING
- BYTES
- INTEGER
- INT64
- FLOAT
- FLOAT64
- NUMERIC
- BIGNUMERIC
- BOOLEAN
- BOOL
- TIMESTAMP
- DATE
- TIME
- DATETIME
- GEOGRAPHY
- RECORD
- STRUCT
- JSON
mode:
type: string
description: The field mode
enum:
- NULLABLE
- REQUIRED
- REPEATED
description:
type: string
description: The field description
fields:
type: array
items:
$ref: '#/components/schemas/TableFieldSchema'
description: Nested fields for RECORD type
Table:
type: object
properties:
kind:
type: string
description: The resource type, always bigquery#table
id:
type: string
description: The fully-qualified unique name of the table
tableReference:
$ref: '#/components/schemas/TableReference'
friendlyName:
type: string
description: A descriptive name for the table
description:
type: string
description: A user-friendly description of the table
schema:
$ref: '#/components/schemas/TableSchema'
numRows:
type: string
description: The number of rows in the table
numBytes:
type: string
description: The size of the table in bytes
type:
type: string
description: The type of the table
enum:
- TABLE
- VIEW
- MATERIALIZED_VIEW
- EXTERNAL
- SNAPSHOT
creationTime:
type: string
description: The time when this table was created
expirationTime:
type: string
description: The time when this table expires
labels:
type: object
additionalProperties:
type: string
description: Labels associated with this table
TableSchema:
type: object
properties:
fields:
type: array
items:
$ref: '#/components/schemas/TableFieldSchema'
description: Describes the fields in a table
TableList:
type: object
properties:
kind:
type: string
description: The resource type
tables:
type: array
items:
$ref: '#/components/schemas/Table'
description: Tables in the requested dataset
nextPageToken:
type: string
description: A token to request the next page of results
totalItems:
type: integer
description: The total number of tables in the dataset
TableReference:
type: object
properties:
projectId:
type: string
description: The ID of the project containing the table
datasetId:
type: string
description: The ID of the dataset containing the table
tableId:
type: string
description: The ID of the table
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/bigquery: Full access to BigQuery
https://www.googleapis.com/auth/bigquery.readonly: Read-only access to BigQuery
externalDocs:
description: BigQuery API Documentation
url: https://cloud.google.com/bigquery/docs/reference/rest