CREATE FUNCTION_SOURCE
Syntax
CREATE FUNCTION_SOURCE
function_source_name
WITH (function_source_parameter = value [, ...]);
Description
Defines a new function source from a specified file. For Java functions, this file would be a Java JAR. This provides the source for user-defined functions. See CREATE FUNCTION for how to create a function from a function source.
See the Creating a function tutorial for a full example of adding a fuunction.
Arguments
function_source_name
Name of the function source to create. If the name is case sensitive you must wrap it in double quotes; otherwise the system uses the lower case name.
WITH (function_source_parameter = value [, … ])
This clause specifies the function source parameters.
Function Source Parameters
file
Required. Specifies a local filesystem path from which to import the function source. Function source may include one or many functions. See CREATE FUNCTION. Type: String Valid values: A valid file path in the current user's local filesystem.
description
Optional. Specifies a description for the function source. Default value: None Type: String
Examples
Create a new function source
In the below example, a new function source is created with the name MySrc
from a .jar file available on the local path.
demodb.public/demostore# CREATE FUNCTION_SOURCE "myFuncs" WITH ( 'file' = '@/path/to/func.jar', 'description' = 'my functions');
+-----------------+---------+----------+------------------------------------------+
| Type | Name | Command | Summary |
+=================+=========+==========+==========================================+
| function_source | myFuncs | CREATE | function source "myFuncs" was |
| | | | successfully created |
+-----------------+---------+----------+------------------------------------------+
Last updated