List

Lists all routines in the specified dataset

4 variables
23 variables

Lists all routines in the specified dataset. Requires the READER dataset role

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View and manage your data in Google BigQuery
  • View and manage your data across Google Cloud Platform services
  • View your data across Google Cloud Platform services

Input

This building block consumes 4 input parameters

  = Parameter name
  = Format

projectId STRING Required

Project ID of the routines to list

datasetId STRING Required

Dataset ID of the routines to list

pageToken STRING

Page token, returned by a previous call, to request the next page of results

maxResults INTEGER

The maximum number of results per page

Output

This building block provides 23 output parameters

  = Parameter name
  = Format

routines[] OBJECT

A user-defined function or a stored procedure

routines[].routineType ENUMERATION

Required

routines[].creationTime INTEGER

Output only. The time when this routine was created, in milliseconds since the epoch

routines[].routineReference OBJECT

routines[].routineReference.datasetId STRING

[Required] The ID of the dataset containing this routine

routines[].routineReference.routineId STRING

[Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters

routines[].routineReference.projectId STRING

[Required] The ID of the project containing this routine

routines[].arguments[] OBJECT

Input/output argument of a function or a stored procedure

routines[].arguments[].argumentKind ENUMERATION

Optional. Defaults to FIXED_TYPE

routines[].arguments[].mode ENUMERATION

Optional. Specifies whether the argument is input or output. Can be set for procedures only

routines[].arguments[].dataType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

routines[].arguments[].name STRING

Optional. The name of this argument. Can be absent for function return argument

routines[].importedLibraries[] STRING

routines[].lastModifiedTime INTEGER

Output only. The time when this routine was last modified, in milliseconds since the epoch

routines[].language ENUMERATION

Optional. Defaults to "SQL"

routines[].returnType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

routines[].returnType.structType OBJECT

routines[].returnType.arrayElementType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

routines[].returnType.arrayElementType.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

routines[].returnType.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

routines[].definitionBody STRING

Required. The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses. For example, for the function created with the following statement create function JoinLines(x string, y string) as (concat(x, "\n", y)) definition_body = r'concat(x, "\n", y)' (\n is not replaced with linebreak). If language=JAVASCRIPT, it is the evaluated string in the AS clause. For example, for the function created with the following statement CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n' definition_body = 'return "\n";\n' (both \n are replaced with linebreaks)

routines[].etag STRING

Output only. A hash of this resource

nextPageToken STRING

A token to request the next page of results