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. # IAM Permissions
Requires the bigquery.tables.update permission on the table.
Arguments
| Parameters | |
|---|---|
datasetId |
Required. Dataset ID of the table to update |
projectId |
Required. Project ID of the table to update |
tableId |
Required. Table ID of the table to update |
autodetect_schema |
Optional. When true will autodetect schema, else will keep original schema |
body |
Required. |
Raised exceptions
| Exceptions | |
|---|---|
ConnectionError |
In case of a network problem (such as DNS failure or refused connection). |
HttpError |
If the response status is >= 400 (excluding 429 and 503). |
TimeoutError |
If a long-running operation takes longer to finish than the specified timeout limit. |
TypeError |
If an operation or function receives an argument of the wrong type. |
ValueError |
If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout. |
Response
If successful, the response contains an instance of Table.
Subworkflow snippet
Some fields might be optional or required. To identify required fields, refer to the API documentation.
YAML
- update: call: googleapis.bigquery.v2.tables.update args: datasetId: ... projectId: ... tableId: ... autodetect_schema: ... body: biglakeConfiguration: connectionId: ... fileFormat: ... storageUri: ... tableFormat: ... clustering: fields: ... defaultCollation: ... defaultRoundingMode: ... description: ... encryptionConfiguration: kmsKeyName: ... expirationTime: ... externalCatalogTableOptions: connectionId: ... parameters: ... storageDescriptor: inputFormat: ... locationUri: ... outputFormat: ... serdeInfo: name: ... parameters: ... serializationLibrary: ... externalDataConfiguration: autodetect: ... avroOptions: useAvroLogicalTypes: ... bigtableOptions: columnFamilies: ... ignoreUnspecifiedColumnFamilies: ... outputColumnFamiliesAsJson: ... readRowkeyAsString: ... compression: ... connectionId: ... csvOptions: allowJaggedRows: ... allowQuotedNewlines: ... encoding: ... fieldDelimiter: ... nullMarker: ... nullMarkers: ... preserveAsciiControlCharacters: ... quote: ... skipLeadingRows: ... sourceColumnMatch: ... dateFormat: ... datetimeFormat: ... decimalTargetTypes: ... fileSetSpecType: ... googleSheetsOptions: range: ... skipLeadingRows: ... hivePartitioningOptions: mode: ... requirePartitionFilter: ... sourceUriPrefix: ... ignoreUnknownValues: ... jsonExtension: ... jsonOptions: encoding: ... maxBadRecords: ... metadataCacheMode: ... objectMetadata: ... parquetOptions: enableListInference: ... enumAsString: ... mapTargetType: ... referenceFileSchemaUri: ... schema: fields: ... foreignTypeInfo: typeSystem: ... sourceFormat: ... sourceUris: ... timeFormat: ... timeZone: ... timestampFormat: ... timestampTargetPrecision: ... friendlyName: ... kind: ... labels: ... managedTableType: ... materializedView: allowNonIncrementalDefinition: ... enableRefresh: ... maxStaleness: ... query: ... refreshIntervalMs: ... maxStaleness: ... model: modelOptions: labels: ... lossType: ... modelType: ... trainingRuns: ... rangePartitioning: field: ... range: end: ... interval: ... start: ... requirePartitionFilter: ... resourceTags: ... schema: ... tableConstraints: foreignKeys: columnReferences: referencedColumn: ... referencingColumn: ... name: ... referencedTable: datasetId: ... projectId: ... tableId: ... primaryKey: columns: ... tableReference: ... tableReplicationInfo: replicationIntervalMs: ... sourceTable: ... timePartitioning: expirationMs: ... field: ... requirePartitionFilter: ... type: ... view: foreignDefinitions: ... privacyPolicy: aggregationThresholdPolicy: privacyUnitColumns: ... threshold: ... differentialPrivacyPolicy: deltaBudget: ... deltaPerQuery: ... epsilonBudget: ... maxEpsilonPerQuery: ... maxGroupsContributed: ... privacyUnitColumn: ... joinRestrictionPolicy: joinAllowedColumns: ... joinCondition: ... query: ... useExplicitColumnNames: ... useLegacySql: ... userDefinedFunctionResources: ... result: updateResult
JSON
[ { "update": { "call": "googleapis.bigquery.v2.tables.update", "args": { "datasetId": "...", "projectId": "...", "tableId": "...", "autodetect_schema": "...", "body": { "biglakeConfiguration": { "connectionId": "...", "fileFormat": "...", "storageUri": "...", "tableFormat": "..." }, "clustering": { "fields": "..." }, "defaultCollation": "...", "defaultRoundingMode": "...", "description": "...", "encryptionConfiguration": { "kmsKeyName": "..." }, "expirationTime": "...", "externalCatalogTableOptions": { "connectionId": "...", "parameters": "...", "storageDescriptor": { "inputFormat": "...", "locationUri": "...", "outputFormat": "...", "serdeInfo": { "name": "...", "parameters": "...", "serializationLibrary": "..." } } }, "externalDataConfiguration": { "autodetect": "...", "avroOptions": { "useAvroLogicalTypes": "..." }, "bigtableOptions": { "columnFamilies": "...", "ignoreUnspecifiedColumnFamilies": "...", "outputColumnFamiliesAsJson": "...", "readRowkeyAsString": "..." }, "compression": "...", "connectionId": "...", "csvOptions": { "allowJaggedRows": "...", "allowQuotedNewlines": "...", "encoding": "...", "fieldDelimiter": "...", "nullMarker": "...", "nullMarkers": "...", "preserveAsciiControlCharacters": "...", "quote": "...", "skipLeadingRows": "...", "sourceColumnMatch": "..." }, "dateFormat": "...", "datetimeFormat": "...", "decimalTargetTypes": "...", "fileSetSpecType": "...", "googleSheetsOptions": { "range": "...", "skipLeadingRows": "..." }, "hivePartitioningOptions": { "mode": "...", "requirePartitionFilter": "...", "sourceUriPrefix": "..." }, "ignoreUnknownValues": "...", "jsonExtension": "...", "jsonOptions": { "encoding": "..." }, "maxBadRecords": "...", "metadataCacheMode": "...", "objectMetadata": "...", "parquetOptions": { "enableListInference": "...", "enumAsString": "...", "mapTargetType": "..." }, "referenceFileSchemaUri": "...", "schema": { "fields": "...", "foreignTypeInfo": { "typeSystem": "..." } }, "sourceFormat": "...", "sourceUris": "...", "timeFormat": "...", "timeZone": "...", "timestampFormat": "...", "timestampTargetPrecision": "..." }, "friendlyName": "...", "kind": "...", "labels": "...", "managedTableType": "...", "materializedView": { "allowNonIncrementalDefinition": "...", "enableRefresh": "...", "maxStaleness": "...", "query": "...", "refreshIntervalMs": "..." }, "maxStaleness": "...", "model": { "modelOptions": { "labels": "...", "lossType": "...", "modelType": "..." }, "trainingRuns": "..." }, "rangePartitioning": { "field": "...", "range": { "end": "...", "interval": "...", "start": "..." } }, "requirePartitionFilter": "...", "resourceTags": "...", "schema": "...", "tableConstraints": { "foreignKeys": { "columnReferences": { "referencedColumn": "...", "referencingColumn": "..." }, "name": "...", "referencedTable": { "datasetId": "...", "projectId": "...", "tableId": "..." } }, "primaryKey": { "columns": "..." } }, "tableReference": "...", "tableReplicationInfo": { "replicationIntervalMs": "...", "sourceTable": "..." }, "timePartitioning": { "expirationMs": "...", "field": "...", "requirePartitionFilter": "...", "type": "..." }, "view": { "foreignDefinitions": "...", "privacyPolicy": { "aggregationThresholdPolicy": { "privacyUnitColumns": "...", "threshold": "..." }, "differentialPrivacyPolicy": { "deltaBudget": "...", "deltaPerQuery": "...", "epsilonBudget": "...", "maxEpsilonPerQuery": "...", "maxGroupsContributed": "...", "privacyUnitColumn": "..." }, "joinRestrictionPolicy": { "joinAllowedColumns": "...", "joinCondition": "..." } }, "query": "...", "useExplicitColumnNames": "...", "useLegacySql": "...", "userDefinedFunctionResources": "..." } } }, "result": "updateResult" } } ]