When the default data import purposes do not meet your business requirements, you can
add a custom import purpose to apply post processing to an imported .csv file.
For example, you can add an import purpose for the Employee data type to update
employee information.
In Dev Studio, search for the
pyLoadCustomImportPurposes data transform and open it.
Click Save as.
Click Create and open.
Click Add a row.
In the Action field, select Append and Map
to.
In the Target field, select
.pxResults.
In the Relation field, select a new
page.
In the sub step row, in the Action field, select
Set.
In the Target field, select
.pyName.
In the Source field, enter the name of the custom
purpose in quotation marks, for example,
"UpdateLocations".
Click Add a row to add another sub step.
In the Action field, select
Set.
In the Target field, select
.pyValue.
In the Source field, enter the name of the custom
purpose in quotation marks, for example,
"UpdateLocations".
Click Save.
Result: At run time, your new purpose is displayed in the
Purpose list of the Upload file step in
the data import process. In the Map fields step, you can map the
field in your data type that acts as a unique identifier to a field in the imported .csv
file. The import process passes the new purpose and list of values for the uniquely
mapped field in the .csv file to the pyCustomPostProcessing
activity. New fields, for which you can provide values, are displayed in the
Import records step of the data import process.What to do next: Define the logic for data import. See Adding post processing to import.