v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1342224376.9 KB
tables

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 RFC5789 patch semantics. # IAM Permissions Requires the following IAM permission(s) on the table: - bigquery.tables.update - bigquery.tables.get

patch/projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}

Path parameters

projectIdstring required

Required. Project ID of the table to update

datasetIdstring required

Required. Dataset ID of the table to update

tableIdstring required

Required. Table ID of the table to update

Query parameters

autodetect_schemaboolean

Optional. When true will autodetect schema, else will keep original schema

Request body

numPhysicalBytesstring int64

Output only. The physical size of this table in bytes. This includes storage used for time travel.

numBytesstring int64

Output only. The size of this table in logical bytes, excluding any data in the streaming buffer.

etagstring

Output only. A hash of this resource.

locationstring

Output only. The geographic location where the table resides. This value is inherited from the dataset.

labelsobject

The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

friendlyNamestring

Optional. A descriptive name for this table.

managedTableType'MANAGED_TABLE_TYPE_UNSPECIFIED' | 'NATIVE' | 'BIGLAKE'

Optional. If set, overrides the default managed table type configured in the dataset.

defaultRoundingMode'ROUNDING_MODE_UNSPECIFIED' | 'ROUND_HALF_AWAY_FROM_ZERO' | 'ROUND_HALF_EVEN'

Optional. Defines the default rounding mode specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. During table creation or update, if a decimal field is added to this table without an explicit rounding mode specified, then the field inherits the table default rounding mode. Changing this field doesn't affect existing fields.

numActiveLogicalBytesstring int64

Output only. Number of logical bytes that are less than 90 days old.

numRowsstring uint64

Output only. The number of rows of data in this table, excluding any data in the streaming buffer.

maxStalenessstring

Optional. The maximum staleness of data that could be returned when the table (or stale MV) is queried. Staleness encoded as a string encoding of sql IntervalValue type.

numLongTermBytesstring int64

Output only. The number of logical bytes in the table that are considered "long-term storage".

selfLinkstring

Output only. A URL that can be used to access this resource again.

creationTimestring int64

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

numTimeTravelPhysicalBytesstring int64

Output only. Number of physical bytes used by time travel storage (deleted or changed data). This data is not kept in real time, and might be delayed by a few seconds to a few minutes.

kindstring

The type of resource ID.

numLongTermLogicalBytesstring int64

Output only. Number of logical bytes that are more than 90 days old.

descriptionstring

Optional. A user-friendly description of this table.

numTotalLogicalBytesstring int64

Output only. Total number of logical bytes in the table or materialized view.

numTotalPhysicalBytesstring int64

Output only. The physical size of this table in bytes. This also includes storage used for time travel. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.

idstring

Output only. An opaque ID uniquely identifying the table.

defaultCollationstring

Optional. Defines the default collation specification of new STRING fields in the table. During table creation or update, if a STRING field is added to this table without explicit collation specified, then the table inherits the table default collation. A change to this field affects only fields added afterwards, and does not alter the existing fields. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.

numCurrentPhysicalBytesstring int64

Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.

resourceTagsobject

[Optional] The tags associated with this table. Tag keys are globally unique. See additional information on tags. An object containing a list of "key": value pairs. The key is the namespaced friendly name of the tag key, e.g. "12345/environment" where 12345 is parent id. The value is the friendly short name of the tag value, e.g. "production".

numLongTermPhysicalBytesstring int64

Output only. Number of physical bytes more than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.

requirePartitionFilterboolean

Optional. If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.

expirationTimestring int64

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. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created tables.

typestring

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. * EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. * MATERIALIZED_VIEW: A precomputed view defined by a SQL query. * SNAPSHOT: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on table snapshots. The default value is TABLE.

numPartitionsstring int64

Output only. The number of partitions present in the table or materialized view. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.

numActivePhysicalBytesstring int64

Output only. Number of physical bytes less than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.

lastModifiedTimestring uint64

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

Response

Successful response