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.

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

Parameter NameDescription

file

Required. Specifies a local filesystem path to import the Function Source from. 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.

<no-db>/<no-store># CREATE FUNCTION_SOURCE "MySrc" WITH ( 'file' = '/path/to/fnsrc.jar', 'description' = 'my functions' );
<no-db>/<no-store># LIST FUNCTION_SOURCES;
  Name  | Description  |  Owner   |      Created at      |      Updated at       
--------+--------------+----------+----------------------+-----------------------
  MySrc | my functions | sysadmin | 2023-02-15T00:32:32Z | 2023-02-15T00:32:32Z  

Last updated