To create Python code snippets that define transformation functionality, use the Python editor on the
Python
tab.
The following image shows the
Python
tab with the Python editor expanded:
Inputs and Outputs tabs. Use these tabs to add incoming fields and output fields as variables in the Python code snippets. The fields and methods displayed on these tabs vary based on which section of the code entry area is selected.
Go to list. Use to switch among the sections in the code entry area.
Minimize, Open Both, and Maximize icons. Use the Minimize and Maximize buttons to minimize and maximize the transformation properties. Use the Open Both icon to open the Mapping Designer canvas and the transformation properties at the same time.
Code entry area. Enter Python code snippets in the
Pre-Partition Python Code
,
Main Python Code
, and
Post-Partition Python Code
sections.
To expand the transformation properties so that you can see the code entry area more fully, click
Maximize
.
To create Python code snippets, perform the following tasks:
Select the section in which you want to enter a code snippet in the
Go to
list.
To access an incoming field or output field in the snippet, select the field on the
Inputs
or
Outputs
tab, and click
Add
.
You can also create output fields on the
Outputs
tab by clicking
Create New Field
.
Write appropriate Python code based on the section.