As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

google.cloud.bigquery.routine.RoutineArgument

class google.cloud.bigquery.routine.RoutineArgument(**kwargs)[source]

Input/output argument of a function or a stored procedure.

See: https://cloud.google.com/bigquery/docs/reference/rest/v2/routines#argument

Parameters

**kwargs (Dict) – Initial property values.

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(**kwargs)

Initialize self.

from_api_repr(resource)

Factory: construct a routine argument given its API representation.

to_api_repr()

Construct the API resource representation of this routine argument.

Attributes

data_type

Type of a variable, e.g., a function argument.

kind

The kind of argument, for example FIXED_TYPE or ANY_TYPE.

mode

The input/output mode of the argument.

name

Name of this argument.

property data_type

Type of a variable, e.g., a function argument.

See: https://cloud.google.com/bigquery/docs/reference/rest/v2/routines#Argument.FIELDS.data_type

Type

Optional[google.cloud.bigquery_v2.types.StandardSqlDataType]

classmethod from_api_repr(resource)[source]

Factory: construct a routine argument given its API representation.

Parameters

resource (Dict[str, object]) – Resource, as returned from the API.

Returns

Python object, as parsed from resource.

Return type

google.cloud.bigquery.routine.RoutineArgument

property kind

The kind of argument, for example FIXED_TYPE or ANY_TYPE.

See: https://cloud.google.com/bigquery/docs/reference/rest/v2/routines#Argument.FIELDS.argument_kind

Type

Optional[str]

property mode

The input/output mode of the argument.

Type

Optional[str]

property name

Name of this argument.

Can be absent for function return argument.

Type

Optional[str]

to_api_repr()[source]

Construct the API resource representation of this routine argument.

Returns

Routine argument represented as an API resource.

Return type

Dict[str, object]