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 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.
- 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.
- Map the rest of the columns in your file to the fields in the data object.
- 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.
- 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 validation, Skip validation step entirely.
- To perform basic validation, Skip running validate rules.
- Click Start validation.
- Click Continue import.
- Click Finish