- 3.25.0 (latest)
- 3.24.0
- 3.23.1
- 3.22.0
- 3.21.0
- 3.20.1
- 3.19.0
- 3.18.0
- 3.17.2
- 3.16.0
- 3.15.0
- 3.14.1
- 3.13.0
- 3.12.0
- 3.11.4
- 3.4.0
- 3.3.6
- 3.2.0
- 3.1.0
- 3.0.1
- 2.34.4
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.1
- 2.29.0
- 2.28.1
- 2.27.1
- 2.26.0
- 2.25.2
- 2.24.1
- 2.23.3
- 2.22.1
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.1
- 2.15.0
- 2.14.0
- 2.13.1
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.2
- 2.5.0
- 2.4.0
- 2.3.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.28.2
- 1.27.2
- 1.26.1
- 1.25.0
- 1.24.0
- 1.23.1
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
TableListItem(resource)
A read-only table resource from a list operation.
For performance reasons, the BigQuery API only includes some of the table properties when listing tables. Notably, xref_schema and xref_num_rows are missing.
For a full list of the properties that the BigQuery API returns, see the
REST documentation for tables.list
<https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/list>
_.
Parameter | |
---|---|
Name | Description |
resource |
Dict[str, object]
A table-like resource object from a table list response. A |
Properties
clustering_fields
Union[List[str], None]: Fields defining clustering for the table
(Defaults to :data:None
).
Clustering fields are immutable after table creation.
created
Union[datetime.datetime, None]: Datetime at which the table was
created (:data:None
until set from the server).
dataset_id
ID of dataset containing the table.
expires
Union[datetime.datetime, None]: Datetime at which the table will be deleted.
friendly_name
Union[str, None]: Title of the table (defaults to :data:None
).
full_table_id
Union[str, None]: ID for the table (:data:None
until set from the
server).
In the format project_id:dataset_id.table_id
.
labels
Dict[str, str]: Labels for the table.
This method always returns a dict. To change a table's labels,
modify the dict, then call Client.update_table
. To delete a
label, set its value to :data:None
before updating.
partition_expiration
Union[int, None]: Expiration time in milliseconds for a partition.
If this property is set and type_
is not set, type_
will default to TimePartitioningType.DAY
.
partitioning_type
Union[str, None]: Time partitioning of the table if it is
partitioned (Defaults to :data:None
).
path
URL path for the table's APIs.
project
Project bound to the table.
reference
A xref_TableReference pointing to this table.
Returns | |
---|---|
Type | Description |
google.cloud.bigquery.table.TableReference | pointer to this table. |
table_id
The table ID.
table_type
Union[str, None]: The type of the table (:data:None
until set from
the server).
Possible values are 'TABLE'
, 'VIEW'
, or 'EXTERNAL'
.
time_partitioning
google.cloud.bigquery.table.TimePartitioning: Configures time-based partitioning for a table.
view_use_legacy_sql
bool: Specifies whether to execute the view with Legacy or Standard SQL.
This boolean specifies whether to execute the view with Legacy SQL
(:data:True
) or Standard SQL (:data:False
). The client side default is
:data:False
. The server-side default is :data:True
. If this table is
not a view, :data:None
is returned.
Exceptions | |
---|---|
Type | Description |
ValueError | For invalid value types. |
Methods
from_string
from_string(full_table_id: str) -> google.cloud.bigquery.table.TableListItem
Construct a table from fully-qualified table ID.
Parameter | |
---|---|
Name | Description |
full_table_id |
str
A fully-qualified table ID in standard SQL format. Must included a project ID, dataset ID, and table ID, each separated by |
Exceptions | |
---|---|
Type | Description |
ValueError | If full_table_id is not a fully-qualified table ID in standard SQL format. |
Returns | |
---|---|
Type | Description |
Table .. rubric:: Examples >>> Table.from_string('my-project.mydataset.mytable') Table(TableRef...(D...('my-project', 'mydataset'), 'mytable')) | Table parsed from full_table_id . |
to_api_repr
to_api_repr() -> dict
Constructs the API resource of this table
Returns | |
---|---|
Type | Description |
Dict[str, object] | Table represented as an API resource |
to_bqstorage
to_bqstorage() -> str
Construct a BigQuery Storage API representation of this table.
Returns | |
---|---|
Type | Description |
str | A reference to this table in the BigQuery Storage API. |
__init__
__init__(resource)
Initialize self. See help(type(self)) for accurate signature.
TableListItem
TableListItem(resource)
A read-only table resource from a list operation.
For performance reasons, the BigQuery API only includes some of the table properties when listing tables. Notably, xref_schema and xref_num_rows are missing.
For a full list of the properties that the BigQuery API returns, see the
REST documentation for tables.list
<https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/list>
_.
Parameter | |
---|---|
Name | Description |
resource |
Dict[str, object]
A table-like resource object from a table list response. A |
Exceptions | |
---|---|
Type | Description |
ValueError | If tableReference or one of its required members is missing from resource . |