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.
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 fields to return (comma-separated). If unspecified, all fields are returned
|
view |
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: | |
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. |
FULL |
Includes all table information, including storage statistics. It returns same information as STORAGE_STATS view, but may contain additional information in the future. |
STORAGE_STATS |
Includes all information in the BASIC view as well as storage statistics (numBytes, numLongTermBytes, numRows and lastModifiedTime). |
TABLE_METADATA_VIEW_UNSPECIFIED |
The default value. Default to the STORAGE_STATS view. |
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" } } ]