User defined transformation

After the DSG instance.

The following figure illustrates the User Defined Transformation payload fields.

User Defined Transformation Payload

The following table describes the fields for User Defined Transformation method.

PropertiesDescriptionNotes
Programming LanguageProgramming language used for data transformation is selected. The language that is currently supported for transformation is Python.
Source CodeSource code for the selected programming language.Ensure that the class name UserDefinedTrasnformation is not changed while creating the UDF.
Initialization ArgumentsThe list of arguments passed to the constructor of the user defined transformation code is specified in this field.
Rule Advanced SettingsAs part of the security enhancements, the gateway.json file includes the globalUDFSettings key. This key and the corresponding value defines a list of vulnerable modules and methods that are blocked. Provide the specific module that must be overruled. The module will be overruled only for the extract rule. The parameter must be set to the name of the module that must be overruled in the following format.
{"override_blocked_modules": ["<name of module>", "<name of module>"]}
Using the Rule Advanced Settings option, any module that is set as blocked can be overruled to be unblocked.
For example, setting the value as {“override_blocked_modules”: [“os”]}} allows the os module to be used in the code in spite of it being blocked in the gateway.json file.
Currently, methods cannot be overruled using Advanced settings.

The DSG supports the usage of the PyJwt python library in custom UDF creations. PyJWT is a python library that is used to implement Open Authentication (OAuth) using JSON Web Tokens (JWT). JSON Web Tokens (JWT) is an open standard that defines how to transmit information between a sender and a receiver as a JSON object. To authenticate JWT for OAuth, you must write a custom UDF. The PyJwt library version supported by the DSG is 1.7.1.

The DSG supports the usage of the Kafka python library in custom UDF creations. Kafka is a python library that is used for storing, processing, and forwarding for applications in a distributed environment. For example, the DSG uses the Kafka library to forward Transaction Metrics logs to external applications. The Kafka library version supported by the DSG is 2.0.2.

The DSG supports the usage of the Openpyxl Python library in custom UDF creations. Openpyxl is a Python library that is used to parse Excel xlsx, xlsm, xltx, xltm files. This library enables column-based transformation for Microsoft Office Excel. The Openpyxl library version supported by the DSG is 2.6.4.

Last modified January 30, 2025