- Create a new UDF
- Replace an existing UDF
- List existing UDFs
- Get details about a UDF
- Delete a UDF JAR file
- Redistribute a UDF JAR file
- Drop a UDF
You can specify the tdextroutine subcommand options in two ways:
- Use double dashes and the option name.
Example: --database
- Use a single dash and the character for the option.
Example: -d
The following sections provide details about the subcommands and their options.
udf create Options function_name
Creates a new UDF.
function_name is required and defines the UDF name used in queries to call the function.
Use tdextroutine udf create --help to display the available options for the udf create subcommand. These options are listed in the following table.
- -s source_directory
- -a artifact_zipfile_path
- -i artifact_ID
Option | Type | Description |
---|---|---|
--database, -d | TEXT | Creates the UDF in the specified database. If this option is omitted, the default database of the user is used. |
--specific_name, -n | TEXT | The specific name for the function is mandatory for overloaded function names. Unlike function_name, the specific name must be unique within its database to avoid name clashes. You must follow the identifier naming conventions of the C or C++ language. If this option is omitted, function_name is used. |
--source_path, -s | DIRPATH | Path to the directory containing the following:
|
--artifact_path, -a | FILEPATH | Path to the artifact .zip file. XRMigrationTool creates the artifact .zip file based on the UDF manifest file and places the file in the XRMigrationTool output directory. |
--artifact_id, -i | TEXT | Artifact ID of the previously uploaded artifact file. |
udf replace Options function_name
Creates a new UDF or replaces an existing UDF.
The options for udf replace are the same as for udf create.
udf list
Lists the existing UDFs in an environment.
udf fetch udf_id
Gets details about the UDF specified by udf_id.
The udf_id is returned by the udf create subcommand or the udf list subcommand.
If udf_id includes a slash (/) character, you must specify %2F to encode it. Slash is a reserved character.
tdextroutine udf fetch AAA%2FDgAA
udf remove-jar Options function_name
Deletes the JAR file associated with a Java UDF from the database.
Option | Type | Description |
---|---|---|
--database, -d | TEXT | If this option is omitted, the default database of the user is used. |
udf redistribute-jar Options function_name
Redistributes a Java UDF JAR file that was previously registered with the database.
Option | Type | Description |
---|---|---|
--database, -d | TEXT | If this option is omitted, the default database of the user is used. |
udf drop {Options | udf_id}
Drops the specified UDF.
Option | Type | Description |
---|---|---|
-f function_name [-d database_name] | TEXT | If database_name is omitted, the default database of the user is used. |
-n specific_name [-d database_name] | TEXT | If database_name is omitted, the default database of the user is used. |
The udf_id is returned by the udf create subcommand or the udf list subcommand.
If udf_id includes a slash (/) character, you must specify %2F to encode it. Slash is a reserved character.
tdextroutine udf drop AAA%2FDgAA