You can create a reusable Python transformation to use the transformation in multiple mappings. Create a reusable Python transformation in the Developer tool.
In the
Object Explorer
view, select a project or a folder.
Click
File
New
Transformation
.
The
New
dialog box appears.
Select the Python transformation.
Click
Next
.
Enter a name for the transformation.
Optionally, select
Create as Active
.
Click
Finish
.
The transformation appears in the editor.
In the
Overview
view, click the
New
button to add a port to the transformation.
Edit the port to set the name, data type, and precision.
Use port names as variables in the Python code.
Array, map, and struct data types are not available for a reusable transformation.
In the
Python
view, specify the resource files and write the Python code for the transformation.
In the
Advanced
view, edit the advanced properties for the transformation.