google.cloud.bigquery.query.ArrayQueryParameter#

Methods

from_api_repr(resource)

Factory: construct parameter from JSON resource.

positional(array_type, values)

Factory for positional parameters.

to_api_repr()

Construct JSON API representation for the parameter.


class google.cloud.bigquery.query.ArrayQueryParameter(name, array_type, values)[source]#

Bases: google.cloud.bigquery.query._AbstractQueryParameter

Named / positional query parameters for array values.

Parameters
  • name (str or None) – Parameter name, used via @foo syntax. If None, the parameter can only be addressed via position (?).

  • array_type (str) – name of type of array elements. One of ‘STRING’, ‘INT64’, ‘FLOAT64’, ‘NUMERIC’, ‘BOOL’, ‘TIMESTAMP’, or ‘DATE’.

  • values (list of appropriate scalar type.) – the parameter array values.

classmethod from_api_repr(resource)[source]#

Factory: construct parameter from JSON resource.

Parameters

resource (dict) – JSON mapping of parameter

Return type

ArrayQueryParameter

Returns

instance

classmethod positional(array_type, values)[source]#

Factory for positional parameters.

Parameters
  • array_type (str) – name of type of array elements. One of ‘STRING’, ‘INT64’, ‘FLOAT64’, ‘NUMERIC’, ‘BOOL’, ‘TIMESTAMP’, or ‘DATE’.

  • values (list of appropriate scalar type) – the parameter array values.

Return type

ArrayQueryParameter

Returns

instance without name

to_api_repr()[source]#

Construct JSON API representation for the parameter.

Return type

dict

Returns

JSON mapping