public abstract static class RoutineInfo.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract RoutineInfo |
build()
Creates a
RoutineInfo object. |
abstract RoutineInfo.Builder |
setArguments(List<RoutineArgument> argumentList)
Specifies the list of input/output arguments for the routine.
|
abstract RoutineInfo.Builder |
setBody(String body)
Required.
|
abstract RoutineInfo.Builder |
setDeterminismLevel(String determinismLevel)
Sets the JavaScript UDF determinism levels (e.g.
|
abstract RoutineInfo.Builder |
setImportedLibraries(List<String> importedLibrariesList)
Optional.
|
abstract RoutineInfo.Builder |
setLanguage(String language)
Sets the language for the routine (e.g.
|
abstract RoutineInfo.Builder |
setRemoteFunctionOptions(RemoteFunctionOptions remoteFunctionOptions)
Optional.
|
abstract RoutineInfo.Builder |
setReturnTableType(StandardSQLTableType returnTableType)
Optional.
|
abstract RoutineInfo.Builder |
setReturnType(StandardSQLDataType returnType)
Sets the return type of the routine.
|
abstract RoutineInfo.Builder |
setRoutineType(String routineType)
Sets the routine type for the Builder (e.g.
|
public abstract RoutineInfo.Builder setRoutineType(String routineType)
See https://cloud.google.com/bigquery/docs/reference/rest/v2/routines
public abstract RoutineInfo.Builder setDeterminismLevel(String determinismLevel)
public abstract RoutineInfo.Builder setLanguage(String language)
public abstract RoutineInfo.Builder setArguments(List<RoutineArgument> argumentList)
public abstract RoutineInfo.Builder setReturnType(StandardSQLDataType returnType)
Optional if language = "SQL"; required otherwise.
If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time.
public abstract RoutineInfo.Builder setReturnTableType(StandardSQLTableType returnTableType)
public abstract RoutineInfo.Builder setImportedLibraries(List<String> importedLibrariesList)
public abstract RoutineInfo.Builder setBody(String body)
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 definitionBody 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 definitionBody is
return "\n";\n
Note that both \n are replaced with linebreaks.
public abstract RoutineInfo.Builder setRemoteFunctionOptions(RemoteFunctionOptions remoteFunctionOptions)
remoteFunctionOptions
- public abstract RoutineInfo build()
RoutineInfo
object.Copyright © 2023 Google LLC. All rights reserved.