Send feedback
Module query (3.36.0) Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
BigQuery query processing.
Classes
ArrayQueryParameter
(
name
,
array_type
,
values
)
Named / positional query parameters for array values.
name
Optional[str]
Parameter name, used via @foo
syntax. If None, the parameter can only be addressed via position ( ?
).
array_type
Union[str, ScalarQueryParameterType, StructQueryParameterType]
The type of array elements. If given as a string, it must be one of 'STRING'
, 'INT64'
, 'FLOAT64'
, 'NUMERIC'
, 'BIGNUMERIC'
, 'BOOL'
, 'TIMESTAMP'
, 'DATE'
, or 'STRUCT'
/ 'RECORD'
. If the type is 'STRUCT'
/ 'RECORD'
and values
is empty, the exact item type cannot be deduced, thus a StructQueryParameterType
instance needs to be passed in.
values
List[appropriate type]
The parameter array values.
ArrayQueryParameterType
(
array_type
,
*
,
name
=
None
,
description
=
None
)
Type representation for array query parameters.
array_type
Union[ScalarQueryParameterType, StructQueryParameterType]
The type of array elements.
name
Optional[str]
The name of the query parameter. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
description
Optional[str]
The query parameter description. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
ConnectionProperty
(
key
:
str
=
""
,
value
:
str
=
""
)
key
str
The key of the property to set, for example, 'time_zone'
or 'session_id'
.
value
str
The value of the property to set.
RangeQueryParameter
(
range_element_type
,
start
=
None
,
end
=
None
,
name
=
None
)
Named / positional query parameters for range values.
range_element_type
Union[str, RangeQueryParameterType]
The type of range elements. It must be one of 'TIMESTAMP', 'DATE', or 'DATETIME'.
start
Optional[Union[ScalarQueryParameter, str]]
The start of the range value. Must be the same type as range_element_type. If not provided, it's interpreted as UNBOUNDED.
end
Optional[Union[ScalarQueryParameter, str]]
The end of the range value. Must be the same type as range_element_type. If not provided, it's interpreted as UNBOUNDED.
name
Optional[str]
Parameter name, used via @foo
syntax. If None, the parameter can only be addressed via position ( ?
).
RangeQueryParameterType
(
type_
,
*
,
name
=
None
,
description
=
None
)
Type representation for range query parameters.
type_
Union[ScalarQueryParameterType, str]
Type of range element, must be one of 'TIMESTAMP', 'DATETIME', or 'DATE'.
name
Optional[str]
The name of the query parameter. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
description
Optional[str]
The query parameter description. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
ScalarQueryParameter
(
name
:
typing
.
Optional
[
str
],
type_
:
typing
.
Optional
[
typing
.
Union
[
str
,
google
.
cloud
.
bigquery
.
query
.
ScalarQueryParameterType
]
],
value
:
typing
.
Optional
[
typing
.
Union
[
str
,
int
,
float
,
decimal
.
Decimal
,
bool
,
datetime
.
datetime
,
datetime
.
date
]
],
)
Named / positional query parameters for scalar values.
ScalarQueryParameterType
(
type_
,
*
,
name
=
None
,
description
=
None
)
Type representation for scalar query parameters.
type_
str
One of 'STRING', 'INT64', 'FLOAT64', 'NUMERIC', 'BOOL', 'TIMESTAMP', 'DATETIME', or 'DATE'.
name
Optional[str]
The name of the query parameter. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
description
Optional[str]
The query parameter description. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
SqlParameterScalarTypes
()
Supported scalar SQL query parameter types as type objects.
StructQueryParameter
(
name
,
*
sub_params
)
Name / positional query parameters for struct values.
name
Optional[str]
Parameter name, used via @foo
syntax. If None, the parameter can only be addressed via position ( ?
).
StructQueryParameterType
(
*
fields
,
name
=
None
,
description
=
None
)
Type representation for struct query parameters.
fields
Iterable[Union[ ArrayQueryParameterType, ScalarQueryParameterType, StructQueryParameterType ]]
An non-empty iterable describing the struct's field types.
name
Optional[str]
The name of the query parameter. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
description
Optional[str]
The query parameter description. Primarily used if the type is one of the subfields in StructQueryParameterType
instance.
UDFResource
(
udf_type
,
value
)
Describe a single user-defined function (UDF) resource.
udf_type
str
The type of the resource ('inlineCode' or 'resourceUri')
value
str See: https://cloud.google.com/bigquery/user-defined-functions#api
The inline code or resource URI.
Send feedback
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-28 UTC.
Need to tell us more?
[[["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-28 UTC."],[],[],null,["# Module query (3.36.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.36.0 (latest)](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query)\n- [3.35.1](/python/docs/reference/bigquery/3.35.1/google.cloud.bigquery.query)\n- [3.34.0](/python/docs/reference/bigquery/3.34.0/google.cloud.bigquery.query)\n- [3.33.0](/python/docs/reference/bigquery/3.33.0/google.cloud.bigquery.query)\n- [3.31.0](/python/docs/reference/bigquery/3.31.0/google.cloud.bigquery.query)\n- [3.30.0](/python/docs/reference/bigquery/3.30.0/google.cloud.bigquery.query)\n- [3.29.0](/python/docs/reference/bigquery/3.29.0/google.cloud.bigquery.query)\n- [3.27.0](/python/docs/reference/bigquery/3.27.0/google.cloud.bigquery.query)\n- [3.26.0](/python/docs/reference/bigquery/3.26.0/google.cloud.bigquery.query)\n- [3.25.0](/python/docs/reference/bigquery/3.25.0/google.cloud.bigquery.query)\n- [3.24.0](/python/docs/reference/bigquery/3.24.0/google.cloud.bigquery.query)\n- [3.23.1](/python/docs/reference/bigquery/3.23.1/google.cloud.bigquery.query)\n- [3.22.0](/python/docs/reference/bigquery/3.22.0/google.cloud.bigquery.query)\n- [3.21.0](/python/docs/reference/bigquery/3.21.0/google.cloud.bigquery.query)\n- [3.20.1](/python/docs/reference/bigquery/3.20.1/google.cloud.bigquery.query)\n- [3.19.0](/python/docs/reference/bigquery/3.19.0/google.cloud.bigquery.query)\n- [3.18.0](/python/docs/reference/bigquery/3.18.0/google.cloud.bigquery.query)\n- [3.17.2](/python/docs/reference/bigquery/3.17.2/google.cloud.bigquery.query)\n- [3.16.0](/python/docs/reference/bigquery/3.16.0/google.cloud.bigquery.query)\n- [3.15.0](/python/docs/reference/bigquery/3.15.0/google.cloud.bigquery.query)\n- [3.14.1](/python/docs/reference/bigquery/3.14.1/google.cloud.bigquery.query)\n- [3.13.0](/python/docs/reference/bigquery/3.13.0/google.cloud.bigquery.query)\n- [3.12.0](/python/docs/reference/bigquery/3.12.0/google.cloud.bigquery.query)\n- [3.11.4](/python/docs/reference/bigquery/3.11.4/google.cloud.bigquery.query)\n- [3.4.0](/python/docs/reference/bigquery/3.4.0/google.cloud.bigquery.query)\n- [3.3.6](/python/docs/reference/bigquery/3.3.6/google.cloud.bigquery.query)\n- [3.2.0](/python/docs/reference/bigquery/3.2.0/google.cloud.bigquery.query)\n- [3.1.0](/python/docs/reference/bigquery/3.1.0/google.cloud.bigquery.query)\n- [3.0.1](/python/docs/reference/bigquery/3.0.1/google.cloud.bigquery.query)\n- [2.34.4](/python/docs/reference/bigquery/2.34.4/google.cloud.bigquery.query)\n- [2.33.0](/python/docs/reference/bigquery/2.33.0/google.cloud.bigquery.query)\n- [2.32.0](/python/docs/reference/bigquery/2.32.0/google.cloud.bigquery.query)\n- [2.31.0](/python/docs/reference/bigquery/2.31.0/google.cloud.bigquery.query)\n- [2.30.1](/python/docs/reference/bigquery/2.30.1/google.cloud.bigquery.query)\n- [2.29.0](/python/docs/reference/bigquery/2.29.0/google.cloud.bigquery.query)\n- [2.28.1](/python/docs/reference/bigquery/2.28.1/google.cloud.bigquery.query)\n- [2.27.1](/python/docs/reference/bigquery/2.27.1/google.cloud.bigquery.query)\n- [2.26.0](/python/docs/reference/bigquery/2.26.0/google.cloud.bigquery.query)\n- [2.25.2](/python/docs/reference/bigquery/2.25.2/google.cloud.bigquery.query)\n- [2.24.1](/python/docs/reference/bigquery/2.24.1/google.cloud.bigquery.query)\n- [2.23.3](/python/docs/reference/bigquery/2.23.3/google.cloud.bigquery.query)\n- [2.22.1](/python/docs/reference/bigquery/2.22.1/google.cloud.bigquery.query)\n- [2.21.0](/python/docs/reference/bigquery/2.21.0/google.cloud.bigquery.query)\n- [2.20.0](/python/docs/reference/bigquery/2.20.0/google.cloud.bigquery.query)\n- [2.19.0](/python/docs/reference/bigquery/2.19.0/google.cloud.bigquery.query)\n- [2.18.0](/python/docs/reference/bigquery/2.18.0/google.cloud.bigquery.query)\n- [2.17.0](/python/docs/reference/bigquery/2.17.0/google.cloud.bigquery.query)\n- [2.16.1](/python/docs/reference/bigquery/2.16.1/google.cloud.bigquery.query)\n- [2.15.0](/python/docs/reference/bigquery/2.15.0/google.cloud.bigquery.query)\n- [2.14.0](/python/docs/reference/bigquery/2.14.0/google.cloud.bigquery.query)\n- [2.13.1](/python/docs/reference/bigquery/2.13.1/google.cloud.bigquery.query)\n- [2.12.0](/python/docs/reference/bigquery/2.12.0/google.cloud.bigquery.query)\n- [2.11.0](/python/docs/reference/bigquery/2.11.0/google.cloud.bigquery.query)\n- [2.10.0](/python/docs/reference/bigquery/2.10.0/google.cloud.bigquery.query)\n- [2.9.0](/python/docs/reference/bigquery/2.9.0/google.cloud.bigquery.query)\n- [2.8.0](/python/docs/reference/bigquery/2.8.0/google.cloud.bigquery.query)\n- [2.7.0](/python/docs/reference/bigquery/2.7.0/google.cloud.bigquery.query)\n- [2.6.2](/python/docs/reference/bigquery/2.6.2/google.cloud.bigquery.query)\n- [2.5.0](/python/docs/reference/bigquery/2.5.0/google.cloud.bigquery.query)\n- [2.4.0](/python/docs/reference/bigquery/2.4.0/google.cloud.bigquery.query)\n- [2.3.1](/python/docs/reference/bigquery/2.3.1/google.cloud.bigquery.query)\n- [2.2.0](/python/docs/reference/bigquery/2.2.0/google.cloud.bigquery.query)\n- [2.1.0](/python/docs/reference/bigquery/2.1.0/google.cloud.bigquery.query)\n- [2.0.0](/python/docs/reference/bigquery/2.0.0/google.cloud.bigquery.query)\n- [1.28.2](/python/docs/reference/bigquery/1.28.2/google.cloud.bigquery.query)\n- [1.27.2](/python/docs/reference/bigquery/1.27.2/google.cloud.bigquery.query)\n- [1.26.1](/python/docs/reference/bigquery/1.26.1/google.cloud.bigquery.query)\n- [1.25.0](/python/docs/reference/bigquery/1.25.0/google.cloud.bigquery.query)\n- [1.24.0](/python/docs/reference/bigquery/1.24.0/google.cloud.bigquery.query)\n- [1.23.1](/python/docs/reference/bigquery/1.23.1/google.cloud.bigquery.query)\n- [1.22.0](/python/docs/reference/bigquery/1.22.0/google.cloud.bigquery.query)\n- [1.21.0](/python/docs/reference/bigquery/1.21.0/google.cloud.bigquery.query)\n- [1.20.0](/python/docs/reference/bigquery/1.20.0/google.cloud.bigquery.query)\n- [1.19.0](/python/docs/reference/bigquery/1.19.0/google.cloud.bigquery.query)\n- [1.18.0](/python/docs/reference/bigquery/1.18.0/google.cloud.bigquery.query)\n- [1.17.0](/python/docs/reference/bigquery/1.17.0/google.cloud.bigquery.query)\n- [1.16.0](/python/docs/reference/bigquery/1.16.0/google.cloud.bigquery.query) \nBigQuery query processing.\n\nClasses\n-------\n\n### [ArrayQueryParameter](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.ArrayQueryParameter)\n\n ArrayQueryParameter(name, array_type, values)\n\nNamed / positional query parameters for array values.\n\n### [ArrayQueryParameterType](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.ArrayQueryParameterType)\n\n ArrayQueryParameterType(array_type, *, name=None, description=None)\n\nType representation for array query parameters.\n\n### [ConnectionProperty](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.ConnectionProperty)\n\n ConnectionProperty(key: str = \"\", value: str = \"\")\n\nA connection-level property to customize query behavior.\n\nSee\n\u003chttps://cloud.google.com/bigquery/docs/reference/rest/v2/ConnectionProperty\u003e\n\n### [RangeQueryParameter](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.RangeQueryParameter)\n\n RangeQueryParameter(range_element_type, start=None, end=None, name=None)\n\nNamed / positional query parameters for range values.\n\n### [RangeQueryParameterType](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.RangeQueryParameterType)\n\n RangeQueryParameterType(type_, *, name=None, description=None)\n\nType representation for range query parameters.\n\n### [ScalarQueryParameter](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.ScalarQueryParameter)\n\n ScalarQueryParameter(\n name: typing.Optional[str],\n type_: typing.Optional[\n typing.Union[str, google.cloud.bigquery.query.ScalarQueryParameterType]\n ],\n value: typing.Optional[\n typing.Union[\n str, int, float, decimal.Decimal, bool, datetime.datetime, datetime.date\n ]\n ],\n )\n\nNamed / positional query parameters for scalar values.\n\n### [ScalarQueryParameterType](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.ScalarQueryParameterType)\n\n ScalarQueryParameterType(type_, *, name=None, description=None)\n\nType representation for scalar query parameters.\n\n### [SqlParameterScalarTypes](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.SqlParameterScalarTypes)\n\n SqlParameterScalarTypes()\n\nSupported scalar SQL query parameter types as type objects.\n\n### [StructQueryParameter](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.StructQueryParameter)\n\n StructQueryParameter(name, *sub_params)\n\nName / positional query parameters for struct values.\n\n### [StructQueryParameterType](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.StructQueryParameterType)\n\n StructQueryParameterType(*fields, name=None, description=None)\n\nType representation for struct query parameters.\n\n### [UDFResource](/python/docs/reference/bigquery/latest/google.cloud.bigquery.query.UDFResource)\n\n UDFResource(udf_type, value)\n\nDescribe a single user-defined function (UDF) resource."]]