description | string | Optional. The description of the routine, if defined. |
sparkOptions | object | Options for a user-defined Spark routine. |
routineType | string | Required. The type of routine. |
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)) The definition_body is 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' The definition_body is return "\n";\n Note that both \n are replaced with linebreaks. |
returnTableType | object | A table type |
lastModifiedTime | string | Output only. The time when this routine was last modified, in milliseconds since the epoch. |
determinismLevel | string | Optional. The determinism level of the JavaScript UDF, if defined. |
arguments | array | Optional. |
importedLibraries | array | Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries. |
routineReference | object | |
dataGovernanceType | string | Optional. Data governance specific option, if the value is DATA_MASKING, the function will be validated as masking functions. |
remoteFunctionOptions | object | Options for a remote user-defined function. |
creationTime | string | Output only. The time when this routine was created, in milliseconds since the epoch. |
returnType | object | The data type of a variable such as a function argument. Examples include: INT64: {"typeKind": "INT64"} ARRAY: { "typeKind": "ARRAY", "arrayElementType": {"typeKind": "STRING"} } * STRUCT>: { "typeKind": "STRUCT", "structType": { "fields": [ { "name": "x", "type": {"typeKind": "STRING"} }, { "name": "y", "type": { "typeKind": "ARRAY", "arrayElementType": {"typeKind": "DATE"} } } ] } } |
strictMode | boolean | Optional. Can be set for procedures only. If true (default), the definition body will be validated in the creation and the updates of the procedure. For procedures with an argument of ANY TYPE, the definition body validtion is not supported at creation/update time, and thus this field must be set to false explicitly. |
etag | string | Output only. A hash of this resource. |
language | string | Optional. Defaults to "SQL" if remote_function_options field is absent, not set otherwise. |