To make changes to your data more quickly, update data records in bulk by importing updates from a .csv file.
- Upload the file.
- In the navigation pane of App Studio, click Data.
- Click Data objects and integrations.
- Click a data object.
- Click the Records tab, and then click Import.
- In the Purpose list, select Add or update.
- Click Choose File.
- Navigate to your .csv file, and then click Open.
- Click Next.
- Map a column in your file to the key field in the data
object.For example, your file may identify employees by Staff ID but your data object stores this information in the Employee ID field. If your data object has multiple key fields, repeat the following steps for each field.
- In the Match existing records by field, press the Down Arrow key, and then select the column in your file that uniquely identifies each data record.
- Click Select, and then double-click
the field in the data object that corresponds to the column.
Tip: To narrow the list of fields, enter text in the Search field, and then click outside the field.
- Optional: To ignore the case of column and field names, select the Case insensitive matching check box.
- Optional: To select how to handle blank data in the target or source field, select
Update all fields and select one of the following choices:
- Always update – updates all fields in the data object.
- Update if target is blank – updates data for the empty fields in the data object.
- Update if source is not blank – updates data for the fields in the data object that correspond to non-empty fields in the .csv file.
Note: The update options are not applicable when you are adding data records to a data object. The system adds new records irrespective of the update option you select.
- Map the rest of the columns in your file to the fields in the data object.
Tip: To make mapping faster, select a template from the Template type list to use to define the mapping between the fields in your data object and the fields in the .csv file and skip the rest of this step.
- In the Target field column, select the fields in your data
object that correspond to the fields in the .csv file shown in the Source
field column, or click Select to display a dialog
box for searching and filtering fields.
Note: You can select top level and embedded properties as targets for import.
- Optional: If you are importing fields from an external system, you can apply business logic, such as lookups, decision trees, and decision tables to translate the external data into fields that are understood by Pega Platform. In the Mapping options column, click the Mapping options icon to select the type of business logic to use for translation, and click Submit. For more information, see Applying business logic when importing data.
- Optional: Enter a default value. For new records, the default value is used if the source field is blank. For existing records, the default value is used if both the source and target fields are blank. If you use a lookup, decision tree, or decision table, the source value is the value obtained from the lookup, tree, or table. It is not the value in the .csv file.
- Optional: Set defaults for fields that do not have matching source columns in the .csv
- Click View custom defaults.
- Click Add default value.
- Enter the target field or click Select to choose the target field from a list of fields.
- Enter the default value. For new records, the default value is used if it is provided. For existing records, the default value is used if the target value is blank.
- Click Next if you are finished mapping fields, or click Back to mapping to finish mapping fields.
- If you are not using the same method to update data for all the fields in your data object, in the Update type list, select the method for each field.
- In the Target field column, select the fields in your data object that correspond to the fields in the .csv file shown in the Source field column, or click Select to display a dialog box for searching and filtering fields.
- Click Next.
- Select a validation option.
- To skip validataion, Skip validation step entirely.
- To perform basic validation, Skip running validate rules.
- Click Start validation.
- Click Continue import.
- Click Finish