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.
Pick the Bigquery.tables.update action (under tables).
Fill in the fields below, then reference the result from later steps as {{bigqueryTablesUpdate.response.data}}.
Request
Path parameters
projectIdstringrequired
Project ID of the table to update
datasetIdstringrequired
Dataset ID of the table to update
tableIdstringrequired
Table ID of the table to update
Query parameters
altstring
Data format for the response.
One ofjson
fieldsstring
Selector specifying which fields to include in a partial response.
keystring
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstring
OAuth 2.0 token for the current user.
prettyPrintboolean
Returns response with indentations and line breaks.
quotaUserstring
An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
userIpstring
Deprecated. Please use quotaUser instead.
autodetect_schemaboolean
When true will autodetect schema, else will keep original schema
Request body
Enter the body as JSON in the step's Body field.
cloneDefinitionobject
baseTableReferenceobject3 fields
cloneTimestring (date-time)
[Required] The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format.
clusteringobject
fieldsarray<string>
[Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
creationTimestring (int64)
[Output-only] The time when this table was created, in milliseconds since the epoch.
defaultCollationstring
[Output-only] The default collation of the table.
defaultRoundingModestring
[Output-only] The default rounding mode of the table.
descriptionstring
[Optional] A user-friendly description of this table.
encryptionConfigurationobject
kmsKeyNamestring
[Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
etagstring
[Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
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.
externalDataConfigurationobject
autodetectboolean
Try to detect schema and format options automatically. Any option specified explicitly will be honored.
avroOptionsobject1 fields
bigtableOptionsobject3 fields
compressionstring
[Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
connectionIdstring
[Optional, Trusted Tester] Connection for external data source.
csvOptionsobject8 fields
decimalTargetTypesarray<string>
[Optional] Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown. Example: Suppose the value of this field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is: (38,9) -> NUMERIC; (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); (76,38) -> BIGNUMERIC; (77,38) -> BIGNUMERIC (error if value exeeds supported range). This field cannot contain duplicate types. The order of the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence over BIGNUMERIC. Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] for the other file formats.
googleSheetsOptionsobject2 fields
hivePartitioningOptionsobject3 fields
ignoreUnknownValuesboolean
[Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored.
maxBadRecordsinteger (int32)
[Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
metadataCacheModestring
[Optional] Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.
objectMetadatastring
ObjectMetadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the source_uris. If ObjectMetadata is set, source_format should be omitted. Currently SIMPLE is the only supported Object Metadata type.
parquetOptionsobject2 fields
referenceFileSchemaUristring
[Optional] Provide a referencing file with the expected table schema. Enabled for the format: AVRO, PARQUET, ORC.
schemaobject1 fields
sourceFormatstring
[Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE".
sourceUrisarray<string>
[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed.
friendlyNamestring
[Optional] A descriptive name for this table.
idstring
[Output-only] An opaque ID uniquely identifying the table.
kindstring
[Output-only] The type of the resource.
Default "bigquery#table"
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.
lastModifiedTimestring (uint64)
[Output-only] The time when this table was last modified, in milliseconds since the epoch.
locationstring
[Output-only] The geographic location where the table resides. This value is inherited from the dataset.
materializedViewobject
allow_non_incremental_definitionboolean
[Optional] Allow non incremental materialized view definition. The default value is "false".
enableRefreshboolean
[Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true".
lastRefreshTimestring (int64)
[Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
maxStalenessstring (byte)
[Optional] Max staleness of data that could be returned when materizlized view is queried (formatted as Google SQL Interval type).
querystring
[Required] A query whose result is persisted.
refreshIntervalMsstring (int64)
[Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes).
maxStalenessstring (byte)
[Optional] Max staleness of data that could be returned when table or materialized view is queried (formatted as Google SQL Interval type).
modelobject
modelOptionsobject3 fields
[Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
trainingRunsarray<object>4 fields
[Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
numBytesstring (int64)
[Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
numLongTermBytesstring (int64)
[Output-only] The number of bytes in the table that are considered "long-term storage".
numPhysicalBytesstring (int64)
[Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
numRowsstring (uint64)
[Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
num_active_logical_bytesstring (int64)
[Output-only] Number of logical bytes that are less than 90 days old.
num_active_physical_bytesstring (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.
num_long_term_logical_bytesstring (int64)
[Output-only] Number of logical bytes that are more than 90 days old.
num_long_term_physical_bytesstring (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.
num_partitionsstring (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.
num_time_travel_physical_bytesstring (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.
num_total_logical_bytesstring (int64)
[Output-only] Total number of logical bytes in the table or materialized view.
num_total_physical_bytesstring (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.
rangePartitioningobject
fieldstring
[TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
rangeobject3 fields
[TrustedTester] [Required] Defines the ranges for range partitioning.
requirePartitionFilterboolean
[Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
Default false
schemaobject
fieldsarray<object>13 fields
Describes the fields in a table.
selfLinkstring
[Output-only] A URL that can be used to access this resource again.
snapshotDefinitionobject
baseTableReferenceobject3 fields
snapshotTimestring (date-time)
[Required] The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format.
streamingBufferobject
estimatedBytesstring (uint64)
[Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
estimatedRowsstring (uint64)
[Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
oldestEntryTimestring (uint64)
[Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
tableReferenceobject
datasetIdstring
[Required] The ID of the dataset containing this table.
projectIdstring
[Required] The ID of the project containing this table.
tableIdstring
[Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
timePartitioningobject
expirationMsstring (int64)
[Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
fieldstring
[Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
requirePartitionFilterboolean
typestring
[Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
Returns 200 with an object. Read it in later steps with {{bigqueryTablesUpdate.response.data.<field>}}.
cloneDefinitionobject
baseTableReferenceobject3 fields
cloneTimestring (date-time)
[Required] The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format.
clusteringobject
fieldsarray<string>
[Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
creationTimestring (int64)
[Output-only] The time when this table was created, in milliseconds since the epoch.
defaultCollationstring
[Output-only] The default collation of the table.
defaultRoundingModestring
[Output-only] The default rounding mode of the table.
descriptionstring
[Optional] A user-friendly description of this table.
encryptionConfigurationobject
kmsKeyNamestring
[Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
etagstring
[Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
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.
externalDataConfigurationobject
autodetectboolean
Try to detect schema and format options automatically. Any option specified explicitly will be honored.
avroOptionsobject1 fields
bigtableOptionsobject3 fields
compressionstring
[Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
connectionIdstring
[Optional, Trusted Tester] Connection for external data source.
csvOptionsobject8 fields
decimalTargetTypesarray<string>
[Optional] Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown. Example: Suppose the value of this field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is: (38,9) -> NUMERIC; (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); (76,38) -> BIGNUMERIC; (77,38) -> BIGNUMERIC (error if value exeeds supported range). This field cannot contain duplicate types. The order of the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence over BIGNUMERIC. Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] for the other file formats.
googleSheetsOptionsobject2 fields
hivePartitioningOptionsobject3 fields
ignoreUnknownValuesboolean
[Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored.
maxBadRecordsinteger (int32)
[Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
metadataCacheModestring
[Optional] Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.
objectMetadatastring
ObjectMetadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the source_uris. If ObjectMetadata is set, source_format should be omitted. Currently SIMPLE is the only supported Object Metadata type.
parquetOptionsobject2 fields
referenceFileSchemaUristring
[Optional] Provide a referencing file with the expected table schema. Enabled for the format: AVRO, PARQUET, ORC.
schemaobject1 fields
sourceFormatstring
[Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE".
sourceUrisarray<string>
[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed.
friendlyNamestring
[Optional] A descriptive name for this table.
idstring
[Output-only] An opaque ID uniquely identifying the table.
kindstring
[Output-only] The type of the resource.
Default "bigquery#table"
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.
lastModifiedTimestring (uint64)
[Output-only] The time when this table was last modified, in milliseconds since the epoch.
locationstring
[Output-only] The geographic location where the table resides. This value is inherited from the dataset.
materializedViewobject
allow_non_incremental_definitionboolean
[Optional] Allow non incremental materialized view definition. The default value is "false".
enableRefreshboolean
[Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true".
lastRefreshTimestring (int64)
[Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
maxStalenessstring (byte)
[Optional] Max staleness of data that could be returned when materizlized view is queried (formatted as Google SQL Interval type).
querystring
[Required] A query whose result is persisted.
refreshIntervalMsstring (int64)
[Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes).
maxStalenessstring (byte)
[Optional] Max staleness of data that could be returned when table or materialized view is queried (formatted as Google SQL Interval type).
modelobject
modelOptionsobject3 fields
[Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
trainingRunsarray<object>4 fields
[Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
numBytesstring (int64)
[Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
numLongTermBytesstring (int64)
[Output-only] The number of bytes in the table that are considered "long-term storage".
numPhysicalBytesstring (int64)
[Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
numRowsstring (uint64)
[Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
num_active_logical_bytesstring (int64)
[Output-only] Number of logical bytes that are less than 90 days old.
num_active_physical_bytesstring (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.
num_long_term_logical_bytesstring (int64)
[Output-only] Number of logical bytes that are more than 90 days old.
num_long_term_physical_bytesstring (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.
num_partitionsstring (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.
num_time_travel_physical_bytesstring (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.
num_total_logical_bytesstring (int64)
[Output-only] Total number of logical bytes in the table or materialized view.
num_total_physical_bytesstring (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.
rangePartitioningobject
fieldstring
[TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
rangeobject3 fields
[TrustedTester] [Required] Defines the ranges for range partitioning.
requirePartitionFilterboolean
[Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
Default false
schemaobject
fieldsarray<object>13 fields
Describes the fields in a table.
selfLinkstring
[Output-only] A URL that can be used to access this resource again.
snapshotDefinitionobject
baseTableReferenceobject3 fields
snapshotTimestring (date-time)
[Required] The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format.
streamingBufferobject
estimatedBytesstring (uint64)
[Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
estimatedRowsstring (uint64)
[Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
oldestEntryTimestring (uint64)
[Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
tableReferenceobject
datasetIdstring
[Required] The ID of the dataset containing this table.
projectIdstring
[Required] The ID of the project containing this table.
tableIdstring
[Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
timePartitioningobject
expirationMsstring (int64)
[Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
fieldstring
[Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
requirePartitionFilterboolean
typestring
[Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.