Update
|
|||||
|
|
Updates information in an existing routine. The update method replaces the entire Routine resource
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
Input
This building block consumes 35 input parameters
Name | Format | Description |
---|---|---|
projectId Required |
STRING |
Project ID of the routine to update |
datasetId Required |
STRING |
Dataset ID of the routine to update |
routineId Required |
STRING |
Routine ID of the routine to update |
routineType |
ENUMERATION |
Required |
creationTime |
INTEGER |
Output only. The time when this routine was created, in milliseconds since the epoch |
routineReference |
OBJECT |
|
routineReference.datasetId |
STRING |
[Required] The ID of the dataset containing this routine |
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 |
routineReference.projectId |
STRING |
[Required] The ID of the project containing this routine |
arguments[] |
OBJECT |
Input/output argument of a function or a stored procedure |
arguments[].argumentKind |
ENUMERATION |
Optional. Defaults to FIXED_TYPE |
arguments[].mode |
ENUMERATION |
Optional. Specifies whether the argument is input or output. Can be set for procedures only |
arguments[].dataType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.structType |
OBJECT |
|
arguments[].dataType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.arrayElementType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].dataType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].name |
STRING |
Optional. The name of this argument. Can be absent for function return argument |
importedLibraries[] |
STRING |
|
lastModifiedTime |
INTEGER |
Output only. The time when this routine was last modified, in milliseconds since the epoch |
language |
ENUMERATION |
Optional. Defaults to "SQL" |
returnType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.structType |
OBJECT |
|
returnType.structType.fields[] |
OBJECT |
A field or a column |
returnType.structType.fields[].name |
STRING |
Optional. The name of this field. Can be absent for struct fields |
returnType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.structType |
OBJECT |
|
returnType.arrayElementType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.structType |
OBJECT |
|
returnType.arrayElementType.arrayElementType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.arrayElementType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
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) |
etag |
STRING |
Output only. A hash of this resource |
= Parameter name
= Format
projectId STRING Required Project ID of the routine to update |
datasetId STRING Required Dataset ID of the routine to update |
routineId STRING Required Routine ID of the routine to update |
routineType ENUMERATION Required |
creationTime INTEGER Output only. The time when this routine was created, in milliseconds since the epoch |
routineReference OBJECT |
routineReference.datasetId STRING [Required] The ID of the dataset containing this routine |
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 |
routineReference.projectId STRING [Required] The ID of the project containing this routine |
arguments[] OBJECT Input/output argument of a function or a stored procedure |
arguments[].argumentKind ENUMERATION Optional. Defaults to FIXED_TYPE |
arguments[].mode ENUMERATION Optional. Specifies whether the argument is input or output. Can be set for procedures only |
arguments[].dataType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.structType OBJECT |
arguments[].dataType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.arrayElementType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].dataType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].name STRING Optional. The name of this argument. Can be absent for function return argument |
importedLibraries[] STRING |
lastModifiedTime INTEGER Output only. The time when this routine was last modified, in milliseconds since the epoch |
language ENUMERATION Optional. Defaults to "SQL" |
returnType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.structType OBJECT |
returnType.structType.fields[] OBJECT A field or a column |
returnType.structType.fields[].name STRING Optional. The name of this field. Can be absent for struct fields |
returnType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.structType OBJECT |
returnType.arrayElementType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.structType OBJECT |
returnType.arrayElementType.arrayElementType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.arrayElementType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
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) |
etag STRING Output only. A hash of this resource |
Output
This building block provides 32 output parameters
Name | Format | Description |
---|---|---|
routineType |
ENUMERATION |
Required |
creationTime |
INTEGER |
Output only. The time when this routine was created, in milliseconds since the epoch |
routineReference |
OBJECT |
|
routineReference.datasetId |
STRING |
[Required] The ID of the dataset containing this routine |
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 |
routineReference.projectId |
STRING |
[Required] The ID of the project containing this routine |
arguments[] |
OBJECT |
Input/output argument of a function or a stored procedure |
arguments[].argumentKind |
ENUMERATION |
Optional. Defaults to FIXED_TYPE |
arguments[].mode |
ENUMERATION |
Optional. Specifies whether the argument is input or output. Can be set for procedures only |
arguments[].dataType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.structType |
OBJECT |
|
arguments[].dataType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.arrayElementType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].dataType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].name |
STRING |
Optional. The name of this argument. Can be absent for function return argument |
importedLibraries[] |
STRING |
|
lastModifiedTime |
INTEGER |
Output only. The time when this routine was last modified, in milliseconds since the epoch |
language |
ENUMERATION |
Optional. Defaults to "SQL" |
returnType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.structType |
OBJECT |
|
returnType.structType.fields[] |
OBJECT |
A field or a column |
returnType.structType.fields[].name |
STRING |
Optional. The name of this field. Can be absent for struct fields |
returnType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.structType |
OBJECT |
|
returnType.arrayElementType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.structType |
OBJECT |
|
returnType.arrayElementType.arrayElementType.arrayElementType |
OBJECT |
The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.arrayElementType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.typeKind |
ENUMERATION |
Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
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) |
etag |
STRING |
Output only. A hash of this resource |
= Parameter name
= Format
routineType ENUMERATION Required |
creationTime INTEGER Output only. The time when this routine was created, in milliseconds since the epoch |
routineReference OBJECT |
routineReference.datasetId STRING [Required] The ID of the dataset containing this routine |
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 |
routineReference.projectId STRING [Required] The ID of the project containing this routine |
arguments[] OBJECT Input/output argument of a function or a stored procedure |
arguments[].argumentKind ENUMERATION Optional. Defaults to FIXED_TYPE |
arguments[].mode ENUMERATION Optional. Specifies whether the argument is input or output. Can be set for procedures only |
arguments[].dataType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.structType OBJECT |
arguments[].dataType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
arguments[].dataType.arrayElementType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].dataType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
arguments[].name STRING Optional. The name of this argument. Can be absent for function return argument |
importedLibraries[] STRING |
lastModifiedTime INTEGER Output only. The time when this routine was last modified, in milliseconds since the epoch |
language ENUMERATION Optional. Defaults to "SQL" |
returnType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.structType OBJECT |
returnType.structType.fields[] OBJECT A field or a column |
returnType.structType.fields[].name STRING Optional. The name of this field. Can be absent for struct fields |
returnType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.structType OBJECT |
returnType.arrayElementType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.structType OBJECT |
returnType.arrayElementType.arrayElementType.arrayElementType OBJECT The type of a variable, e.g., a function argument.
Examples:
INT64: {type_kind="INT64"}
ARRAY |
returnType.arrayElementType.arrayElementType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.arrayElementType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
returnType.typeKind ENUMERATION Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY") |
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) |
etag STRING Output only. A hash of this resource |