Stay organized with collections Save and categorize content based on your preferences.
DB-API Cursor to Google BigQuery.
Inheritancebuiltins.object > Cursor Methods closeMark the cursor as closed, preventing its further use.
executeexecute(operation, parameters=None, job_id=None, job_config=None)
Prepare and execute a database operation.
Note: When setting query parameters, values which are "text" (unicode
in Python2, str
in Python3) will use the 'STRING' BigQuery type. Values which are "bytes" (str
in Python2, bytes
in Python3), will use using the 'BYTES' type.
A
datetime.datetime
parameter without timezone information uses the 'DATETIME' BigQuery type (example: Global Pi Day Celebration March 14, 2017 at 1:59pm). A
datetime.datetime
parameter with timezone information uses the 'TIMESTAMP' BigQuery type (example: a wedding on April 29, 2011 at 11am, British Summer Time).
For more information about BigQuery data types, see:
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types
`STRUCT`/`RECORD` and `REPEATED` query parameters are not
yet supported. See:
https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3524
Parameters Name Description operation
str
A Google BigQuery query string.
parameters
Union[Mapping[str, Any], Sequence[Any]]
(Optional) dictionary or sequence of parameter values.
job_id
str
(Optional) The job_id to use. If not set, a job ID is generated at random.
job_config
google.cloud.bigquery.job.QueryJobConfig
(Optional) Extra configuration options for the query job.
executemanyexecutemany(operation, seq_of_parameters)
Prepare and execute a database operation multiple times.
Parameters Name Descriptionoperation
str
A Google BigQuery query string.
seq_of_parameters
Union[Sequence[Mapping[str, Any], Sequence[Any]]]
Sequence of many sets of parameter values.
fetchallFetch all remaining results from the last execute*()
call.
List[Tuple]
A list of all the rows in the results. fetchmany
Fetch multiple results from the last execute*()
call.
arraysize
attribute before calling execute()
to set the batch size. Parameter Name Description size
int
(Optional) Maximum number of rows to return. Defaults to the arraysize
property value. If arraysize
is not set, it defaults to 1
.
List[Tuple]
A list of rows. fetchone
Fetch a single row from the results of the last execute*()
call.
Tuple
A tuple representing a row or None
if no more data is available. setinputsizes
No-op, but for consistency raise an error if cursor is closed.
setoutputsizesetoutputsize(size, column=None)
No-op, but for consistency raise an error if cursor is closed.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]
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