Package com.google.cloud.bigquery
Class UserDefinedFunction
- java.lang.Object
-
- com.google.cloud.bigquery.UserDefinedFunction
-
- All Implemented Interfaces:
Serializable
public abstract class UserDefinedFunction extends Object implements Serializable
Google BigQuery User Defined Function. BigQuery supports user-defined functions (UDFs) written in JavaScript. A UDF is similar to the "Map" function in a MapReduce: it takes a single row as input and produces zero or more rows as output. The output can potentially have a different schema than the input.- See Also:
- User-Defined Functions , Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserDefinedFunction.Type
Type of user-defined function.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static UserDefinedFunction
fromUri(String functionDefinition)
Creates a Google Cloud BigQuery user-defined function given a Google Cloud Storage URI (e.g.String
getContent()
IfgetType()
isUserDefinedFunction.Type.INLINE
this method returns a code blob.UserDefinedFunction.Type
getType()
Returns the type of user defined function.int
hashCode()
static UserDefinedFunction
inline(String functionDefinition)
Creates a Google Cloud BigQuery user-defined function given a code blob.abstract com.google.api.services.bigquery.model.UserDefinedFunctionResource
toPb()
-
-
-
Method Detail
-
getType
public UserDefinedFunction.Type getType()
Returns the type of user defined function.
-
getContent
public String getContent()
IfgetType()
isUserDefinedFunction.Type.INLINE
this method returns a code blob. IfgetType()
isUserDefinedFunction.Type.FROM_URI
the method returns a Google Cloud Storage URI (e.g. gs://bucket/path).
-
toPb
public abstract com.google.api.services.bigquery.model.UserDefinedFunctionResource toPb()
-
inline
public static UserDefinedFunction inline(String functionDefinition)
Creates a Google Cloud BigQuery user-defined function given a code blob.
-
fromUri
public static UserDefinedFunction fromUri(String functionDefinition)
Creates a Google Cloud BigQuery user-defined function given a Google Cloud Storage URI (e.g. gs://bucket/path).
-
-