Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Adding a custom import purpose

Updated on April 6, 2022

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.

  1. In Dev Studio, search for the pyLoadCustomImportPurposes data transform and open it.
  2. Click Save as.
  3. Click Create and open.
  4. Click Add a row.
  5. In the Action field, select Append and Map to.
  6. In the Target field, select .pxResults.
  7. In the Relation field, select a new page.
  8. In the sub step row, in the Action field, select Set.
  9. In the Target field, select .pyName.
  10. In the Source field, enter the name of the custom purpose in quotation marks, for example, "UpdateLocations".
  11. Click Add a row to add another sub step.
  12. In the Action field, select Set.
  13. In the Target field, select .pyValue.
  14. In the Source field, enter the name of the custom purpose in quotation marks, for example, "UpdateLocations".
    Custom import purposes configuration
    The pyLoadCustomImportPurposes data transform
  15. 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.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us