Gets the specified table resource by table ID. This method does not
return the data in the table, it only returns the table resource, which
describes the structure of this table. # IAM Permissions Requires the
bigquery.tables.get permission on the table.
Arguments
| Parameters | |
|---|---|
datasetId |
Required. Dataset ID of the requested table |
projectId |
Required. Project ID of the requested table |
tableId |
Required. Table ID of the requested table |
selectedFields |
List of table schema fields to return (comma-separated). If unspecified, all fields are returned. A fieldMask cannot be used here because the fields will automatically be converted from camelCase to snake_case and the conversion will fail if there are underscores. Since these are fields in BigQuery table schemas, underscores are allowed. |
view |
Optional. Specifies the view that determines which table information is returned. By default, basic table information and storage statistics (STORAGE_STATS) are returned. |
| Enum type. Can be one of the following: | |
TABLE_METADATA_VIEW_UNSPECIFIED |
The default value. Default to the STORAGE_STATS view. |
BASIC |
Includes basic table information including schema and partitioning specification. This view does not include storage statistics such as numRows or numBytes. This view is significantly more efficient and should be used to support high query rates. |
STORAGE_STATS |
Includes all information in the BASIC view as well as storage statistics (numBytes, numLongTermBytes, numRows and lastModifiedTime). |
FULL |
Includes all table information, including storage statistics. It returns same information as STORAGE_STATS view, but may contain additional information in the future. |
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
- get: call: googleapis.bigquery.v2.tables.get args: datasetId: ... projectId: ... tableId: ... selectedFields: ... view: ... result: getResult
JSON
[ { "get": { "call": "googleapis.bigquery.v2.tables.get", "args": { "datasetId": "...", "projectId": "...", "tableId": "...", "selectedFields": "...", "view": "..." }, "result": "getResult" } } ]