UDx
OTCAD enables you to create, list, and delete custom UDx, so that you can integrate them with existing database tables. UDx allow you to reuse and share code that extends built-in functionality. Use UDx to perform specific tasks such as complex calculations, transformations, or custom data manipulations.
You can reuse a UDx several times. A function always returns a value explicitly by specifying an expression. It is a good choice to calculate and return a value. You can use UDFs to extend built-in functions or to encapsulate calculations that are standard for your organization. UDFs you create can be called in a way similar to built-in functions.
You write a UDF’s logic (it's handler) – in python, C++, or java.
About UDx
You can view and manage UDx. After logging in to OTCAD, the home page appears. Select the More options button and UDx. The User-defined extensions page appears with the Functions and UDx libraries tabs.
The Functions tab lists the functions that are available in the system. The Active SDK version label displays the current SDK version of the database. The following columns are displayed:
- Schema name - The name of the schema.
- Function name - The name of the function.
- Function type - The type of the function. Choose from among Scalar, Aggregate, Analytic, and Transform.
- SDK version - The version of the SDK used to create the library. This is applicable only for C++ and java. For python, this column is empty.
- Language - The language in which the function is developed. For e.g, Python.
- Library - The name of the library to which the UDx is associated.
- Created by - The user ID of the person who created the function.
- Actions - Option to delete the function. For more information about deleting a function, see Delete a function.
In the Search function name field, enter the name of the function. The function is displayed in the Functions tab of the User-defined extensions page.
The UDx libraries tab lists the UDx along with the status that are available in the system. The following columns are displayed:
- Library - The name of the library containing the UDx.
- Language - The language in which the library is developed. For e.g, Python.
- Functions - The number of functions associated with the UDx.
- Created by -The user ID of the person who created the library.
- Creation date - The date and time of creation of the library.
- Status - The present status of the UDx library.
- Details - Details about the UDx in the system.
- Actions - Option to delete the UDx library. For more information about deleting a UDx library, see Delete a UDx library.
In the Search library name field, enter the name of the UDx library. The UDx library is displayed in the UDX libraries tab of the User-defined extensions page.
Create a library
To create a library, do the following in the User-defined extensions page:
-
Select +Add new.
The Create a library page appears.
-
In the Library name field, enter the name of the library.
-
In the Schema list, choose the required schema.
-
In the Language list, choose the required programming language of the functions in the library - Python, Java, or C++.
-
In the File name field, enter the name of the file.
Note
Ensure that the class names are present in this file. -
Click Browse and choose the file that contains the file you selected in the previous step.
Note
For python, you can upload only .zip files. Ensure that the file is available immediately in the root folder. For example, root/my_file.py. For C++, you can upload only .so files. For java, you can upload JAR files. The maximum file size allowed for all languages is 300 MB. Uploaded files are quarantined for antivirus scanning. If no threats are found, OTCAD creates the function.Note
The uploading party is solely responsible for any code or content they submit. OpenText does not review or endorse uploads and assumes no liability for them. By uploading, users acknowledge and accept full responsibility for any consequences that may arise. -
In the Function area, for the Name field, enter the name of the function.
-
In the Function area, for the Class field, enter the name of the class that is defined in the file selected in step 5. For e.g, MultiplyAndSumFactory.
-
From the Type list, select the UDx type:
- Scalar
- Aggregate
- Analytic
- Transform
For more information about the UDx types and the supported languages, see Developing user-defined extensions (UDx).
-
Click +Add to add another function. The newly added functions appear in the UDx libraries tab.
Note
You need to have super user privilege to create the library. -
Click Create.
The library is created and displayed in the UDx libraries tab of the User-defined extensions page.
Delete a function
You can delete functions that are no longer used or needed.
- In the Functions tab of the User defined extensions page, select ⋮ in the Action column.
- Select Delete.
Note
Deleting a function removes it from the database. However, references to the function are not deleted. For example, SQL query. - In the Confirmation dialog, select Delete.
Delete a UDx library
You can delete UDx libraries that are no longer used or needed.
- In the UDx Libraries tab of the User defined extensions page, select ⋮ in the Action column.
- Select Delete.
Note
Deleting a UDx library also deletes the associated UDx function. This may affect all locations where UDx functions are used. You will not be able to retrieve the UDx function after it is deleted as backups will not be available. - In the Confirmation dialog, select Delete.