Table(table_ref, schema=None)
Parameters Name Description table_ref
Union[google.cloud.bigquery.table.TableReference, str]
A pointer to a table. If table_ref
is a string, it must included a project ID, dataset ID, and table ID, each separated by .
.
schema
Optional[Sequence[Union[ SchemaField, Mapping[str, Any] ]]]
The table's schema. If any item is a mapping, its content must be compatible with from_api_repr.
Properties clone_definition clustering_fieldsUnion[List[str], None]: Fields defining clustering for the table
(Defaults to :data:None
).
Clustering fields are immutable after table creation.
Note: BigQuery supports clustering for both partitioned and non-partitioned tables. createdUnion[datetime.datetime, None]: Datetime at which the table was created (:data:None
until set from the server).
ID of dataset containing the table.
descriptionUnion[str, None]: Description of the table (defaults to :data:None
).
ValueError
For invalid value types. encryption_configuration etag
Union[str, None]: ETag for the table resource (:data:None
until set from the server).
Union[datetime.datetime, None]: Datetime at which the table will be deleted.
Exceptions Type DescriptionValueError
For invalid value types. external_data_configuration
Union[google.cloud.bigquery.ExternalConfig, None]: Configuration for an external data source (defaults to :data:None
).
ValueError
For invalid value types. friendly_name
Union[str, None]: Title of the table (defaults to :data:None
).
ValueError
For invalid value types. 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
.
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.
ValueError
If value
type is invalid. location
Union[str, None]: Location in which the table is hosted
Defaults to :data:None
.
Union[datetime.datetime, None]: Datetime at which the table was last modified (:data:None
until set from the server).
Optional[bool]: Enable automatic refresh of the materialized view when the base table is updated. The default value is :data:True
.
Optional[datetime.datetime]: Datetime at which the materialized view was last refreshed (:data:None
until set from the server).
Optional[str]: SQL query defining the table as a materialized view (defaults to :data:None
).
Optional[datetime.timedelta]: The maximum frequency at which this materialized view will be refreshed. The default value is 1800000 milliseconds (30 minutes).
num_bytesUnion[int, None]: The size of the table in bytes (:data:None
until set from the server).
Union[int, None]: The number of rows in the table (:data:None
until set from the server).
Union[int, None]: Expiration time in milliseconds for a partition.
If partition_expiration
is set and type_
is not set, type_
will default to DAY.
Union[str, None]: Time partitioning of the table if it is partitioned (Defaults to :data:None
).
URL path for the table's APIs.
projectProject bound to the table.
range_partitioningOptional[google.cloud.bigquery.table.RangePartitioning]: Configures range-based partitioning for a table.
Note: Beta. The integer range partitioning feature is in a pre-release state and might change or have limited support.Only specify at most one of xref_time_partitioning or xref_range_partitioning.
Exceptions Type DescriptionValueError
If the value is not RangePartitioning or :data:None
. reference
A xref_TableReference pointing to this table.
require_partition_filterbool: If set to true, queries over the partitioned table require a partition filter that can be used for partition elimination to be specified.
schemaSequence[Union[ xref_SchemaField, Mapping[str, Any] ]]: Table's schema.
Exceptions Type DescriptionException
If schema
is not a sequence, or if any item in the sequence is not a SchemaField instance or a compatible mapping representation of the field. self_link
Union[str, None]: URL for the table resource (:data:None
until set from the server).
google.cloud.bigquery.StreamingBuffer: Information about a table's streaming buffer.
table_constraintsTables Primary Key and Foreign Key information.
table_idThe table ID.
table_typeUnion[str, None]: The type of the table (:data:None
until set from the server).
Possible values are 'TABLE'
, 'VIEW'
, 'MATERIALIZED_VIEW'
or 'EXTERNAL'
.
ValueError
If the value is not TimePartitioning or :data:None
. view_query
Union[str, None]: SQL query defining the table as a view (defaults to :data:None
).
By default, the query is treated as Standard SQL. To use Legacy SQL, set view_use_legacy_sql
to :data:True
.
ValueError
For invalid value types. 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.
ValueError
For invalid value types. Methods from_api_repr
from_api_repr(resource: dict) -> google.cloud.bigquery.table.Table
Factory: construct a table given its API representation
Parameter Name Descriptionresource
Dict[str, object]
Table resource representation from the API
Exceptions Type DescriptionKeyError
If the resource
lacks the key 'tableReference'
, or if the dict
stored within the key 'tableReference'
lacks the keys 'tableId'
, 'projectId'
, or 'datasetId'
. Returns Type Description google.cloud.bigquery.table.Table
Table parsed from resource
. from_string
from_string(full_table_id: str) -> google.cloud.bigquery.table.Table
Construct a table from fully-qualified table ID.
Parameter Name Descriptionfull_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 .
.
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
Constructs the API resource of this table
Returns Type DescriptionDict[str, object]
Table represented as an API resource to_bqstorage
Construct a BigQuery Storage API representation of this table.
Returns Type Descriptionstr
A reference to this table in the BigQuery Storage API.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4