Class Connection (1.25.0)

Connection(client, bqstorage_client=None)

DB-API Connection to Google BigQuery.

Parameters

NameDescription
client google.cloud.bigquery.Client

A client used to connect to BigQuery.

bqstorage_client Optional[google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient]

[Beta] An alternative client that uses the faster BigQuery Storage API to fetch rows from BigQuery. If both clients are given, bqstorage_client is used first to fetch query results, with a fallback on client, if necessary. .. note:: There is a known issue with the BigQuery Storage API with small anonymous result sets, which results in such fallback. https://github.com/googleapis/python-bigquery-storage/issues/2

Inheritance

builtins.object > Connection

Methods

close

close()

No-op.

commit

commit()

No-op.

cursor

cursor()

Return a new cursor object.

Returns
TypeDescription
google.cloud.bigquery.dbapi.CursorA DB-API cursor that uses this connection.