A short guide on importing data to a Data Type in Pega
I recently went through a process of importing data to a Data Type - here is a quick guide 👇
- Pega is equipped with a handy Data Import wizard allowing easily to import records to a Data Type
- possible Wizard’s transactions include:
- INSERT or UPDATE rows
- only INSERT rows
- TRUNCATE rows (no rollback possible)
- the wizard supports the migration of data
- there are data migration settings allowing to disable costly transactions in the system (for the time of the migration)
- to access the Data Import wizard:
- from the Data types pane select the Data type that you want to import to
- navigate to the Records tab
- for TRUNCATE you need to provide pyGUIDs of rows to be deleted
- this guide describes the INSERT or UPDATE rows option
- all activities were performed in the Pega Trail environment in a cloud
Obtain the template
- using a template for an import ensures no additional mapping between source fields and target properties is required
- to export the template:
- click on the Export link to obtain the CSV file corresponding to the Data Type
Prepare the import file
- now, you can populate the template with records
- in case you need to match existing records (INSERT or TRUNCATE)
- ensure that you provide matching records (e.g. pyGUID)
- for INSERT
- you can leave the pyGUID field blank
- system will automatically generate required identifiers
Start the import
- once you have your file ready navigate again to the Records of the Data type
- click Import and follow instructions the system displays
- Upload file (1/4)
- select the Purpose of the import from the drop-down list
- upload the import file
- select the Purpose of the import from the drop-down list
- Map fields (2/4)
- specify a matching field for existing records if needed
- provide mapping for fields detected by the wizard
- when using the template you may apply the 1-to-1 mapping
- keep in mind you may define the Default values for empty fields
- additionally, it is possible to define Mapping options e.g. to utilize a Decision table when processing rows
- Import options (3/4)
- you may save current settings as a template
- here a validation of records that will be imported takes place (an optional step)
- in my case the validation of half a million rows took 0:04:29
- Validate and review (4/4)
- based on the validation results you can:
- either proceed with the import
- or cancel it
- importing about a half a million rows (80MB CSV file) took about 00:09:57
- based on the validation results you can:
- on the pega/Pega Labs environment validation and import times were noticeable shorter
- for validation -> 0:00:12
- for import -> 0:01:17
***Edited by Moderator Marissa to add Capability tags***
To see attachments, please log in.