Processing records and data before and after import

You can perform setup actions before the data import process, such as defining a new table or data record, and cleanup actions after the data import process, such as closing an open stream or transaction. For example, you can create a segment to add the records that you want to import for your Employee data type, and then perform actions on the data records, such as copying, before the system imports the data. After the data import, you can close the segment.

You can configure the following activities for processing records and data before and after import:

pyPreImportBatchProcessing
Use this activity to perform setup actions before the system imports data.
pyPreProcessRecordOnImport
Use this activity to perform actions on a data record before you import that record. For example, if you import data for your Employee data type, you can validate each record and, if the record is valid, copy the record to another data type before the record import.
pyPostImportBatchProcessing
Use this activity to perform cleanup actions after the system imports data.

The pyPreImportBatchProcessing and pyPostImportBatchProcessing activities are called from the pzImportRecords activity, which processes the data records that you upload, based on the import purpose.

  1. In Dev Studio, search for and open the activity that you want to configure.
  2. On the Activity page, click Save as.
  3. Click Create and open.
  4. Configure the activity according to your business needs. For more information, see Activities.
  5. Click Save.