CREATE FUNCTION_SOURCE

Only valid for approved Organizations. Please reach out to us to enable Functions.

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 Function.

Arguments

function_source_name

Name of the Function Source to create. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.

WITH (function_source_parameter = value [, …​ ])

This clause specifies the Function Source Parameters.

Function Source Parameters

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