# CREATE FUNCTION\_SOURCE

{% hint style="info" %}
**Note** Only valid for approved organizations. Please [contact us to enable functions](https://console.deltastream.io/support-center).
{% endhint %}

## Syntax <a href="#synopsis" id="synopsis"></a>

```sql
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](https://docs.deltastream.io/reference/sql-syntax/ddl/create-function) for how to create a function from a function source.

See the [Creating a function](https://docs.deltastream.io/how-do-i.../creating-a-function) tutorial for a full example of adding a [fuunction](https://docs.deltastream.io/overview/core-concepts/function).

### 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).

### Function Source Parameters

| Parameter Name | Description                                                                                                                                                                                                                                                                                                    |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `file`         | <p>Required. Specifies a local filesystem path from which to import the function source. Function source may include one or many functions. See <a data-mention href="create-function">create-function</a>.<br><br>Type: String<br>Valid values: A valid file path in the current user's local filesystem.</p> |
| `description`  | <p>Optional. Specifies a description for the function source.<br><br>Default value: None<br>Type: String</p>                                                                                                                                                                                                   |

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

```sh
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                     |
+-----------------+---------+----------+------------------------------------------+
```
