This content has been archived.

Table of Contents

Managing data import purposes

You can manage data import purposes, or reasons for importing data from .csv files that are available to users when they run the data import wizard. You can also disable or remove data import purposes.

Adding data import purposes

You can add data import purposes that can be selected when a .csv file is imported. For example, you can add an import purpose for the Employee data type. At run time, you select the import purpose and upload a .csv file in the Upload file step. In the Map fields step, when you map the Employee ID field in the Employee data type with the Staff ID field in the .csv file and click Next, the system passes the new import purpose and list of staff IDs in the .csv file to the activity.

  • Override the pyLoadCustomImportPurposes data transform. For example, you can add an Update locations purpose as shown in the following figure:

Adding a data import purpose

Adding a data import purpose

The new purpose is displayed in the Purpose list of the Upload file step in the data import process:

New data import purpose at run time

New data import purpose at run time

In the Map fields step, you can map the field in your data type that acts as a unique identifier with 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 activity that defines the logic for data import (pyCustomPostProcessing).

Removing data import purposes

Beginning with Pega 7.2.2, you can remove data import purposes.

  • Override the pyLoadCustomImportPurposes data transform.

Removing a data import purpose

Removing a data import purpose

The Delete purpose is not displayed in the Purpose list of the Upload file step in the data import process:

Data import purpose hidden at run time

Data import purpose hidden at run time

Setting a default data import purpose

Beginning with Pega 7.2.2, you can mark a data import purpose as a default choice.

  1. Override the pyPreProcessDataImport activity.
  2. Set the value for the pyDefaultImportPurpose property to the import purpose that you want as the default selection.

Setting the default data import purpose

Setting the default data import purpose

For example, if you set Update locations as the default import purpose, it is displayed as the default selection in the Purpose list of the Upload file step in the data import process. You can save time during data import if you update locations for your data type on a regular basis.

Default selection of data import purpose at run time

Default selection of data import purpose at run time

You must set the value for the pyDefaultImportPurpose property to an existing import purpose. If the import purpose does not exist, the system displays Add or update as the default purpose.

Disabling the selection of data import purposes

Beginning with Pega 7.2.2, you can prevent the selection of import purposes in the data import process.

  1. Override the pyPreProcessDataImport activity.
  2. Set the value for the pyDisableImportPurpose property to true.

Disabling the selection of data import purpose

Disabling the selection of the data import purpose

When you set the value for the property to true, the system does not allow you to select an import purpose from the Purpose list of the Upload file step in the data import process. The default value in this list is Add or update or the value that you set for the pyDefaultImportPurpose property. For example, to allow only location updates for your data type, you can set the value for the pyDefaultImportPurpose property to UpdateLocations and the value for the pyDisableImportPurpose property to true.

Selection of data import purpose disabled at run time

Selection of data import purpose disabled at run time

Suggest Edit

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.