Data import enhancements
You can add, update, or delete a large number of data records for your data types by uploading .csv files in the Data Designer. The bulk import process allows you to import data from a variety of sources and gives you more control over the data in your application. The following enhancements give you more options while importing data:
Bulk import of cases
You can import case types by completing the same steps that you follow to import data for a data type. This enhancement enables you to quickly import cases in bulk. For example, you have a large amount of opportunity data and you want to make opportunities in the Pega 7 Platform out of it. You can quickly import the opportunity data in bulk by using the Data Designer and create opportunity cases in the Pega 7 Platform.
- You can add and update data for case types, but you cannot delete data.
- For new case instances, you can override the pyNewInstanceTemplate property, which is populated from pyDefault, in extension points and add your own properties.
- For existing case instances, you can override the pyUpdatedInstanceTemplate property, which is populated with system properties, in extension points and add your own properties.
- For cases that require a flow for creation, the system starts the flow execution that is specified in the pyFlowName property if the value of this property is set and does not start the flow execution if the value is blank. If you do not require a flow execution, set the value of pyFlowName to blank in the pyNewInstanceTemplate property for better performance.
Templates that define mapping between fields
While adding or updating data, you can create templates that define the mapping between the fields in your data types and the fields in the .csv files that you use to import data from a source. Data from the same source has the same format and you can later use these templates to save the time required to map fields while importing data from the source. For example, you frequently import data for contract employees to your Employee data type from a company that hires contract employees for your organization. To import this data, you upload a .csv file that always has data in the same format. Without using a template, you have to map all the fields in the Map fields step of the data import process, which takes a long time. If you save the field mapping as a template for your Employee data type, you can use the template in the Map fields step to make all future data imports for contract employees faster.
Using a template for field mapping
Saving a template for field mapping
Date and time format customization
While adding or updating data, you can customize date and time formats.
Customizing date and time format
You can use this option when the .csv file that you are importing contains date and time formats other than Pega or ISO 8601 date and time formats. For more information, see Understanding the Date, TimeofDay, and DateTime property types and the ISO 8601 date and time format documentation.
Data additions to a data type without updating existing data
You can add data to a data type without updating existing data by selecting the Add only purpose in the Upload file step of the data import process. When you select this purpose, you do not have to map a unique identifier in the Map fields step. This purpose is relevant for data records that do not have unique identifiers and are uploaded only to add data, for example, activity data in marketing.If the data that you import does not have autogenerated keys, you must set the key field as a target for one of the source fields in your data type. If the data type has a data record with the same unique identifier (key), the system does not update the record and treats it as an error.
Import purpose for adding data
No unique identifier mapping for Add only purpose
Selection of top-level and embedded properties for import
You can select top-level and embedded properties as targets for import. A data type can contain embedded page lists with properties that you select to map fields in the Data Import wizard. For example, the @mAddress page list is a part of the @mOrders data type that belongs to the @mCustomer data type.
Page list properties
When selecting a target field for the Orders > Address > Locality to map to an embedded property .source field, you can click
Selecting embedded properties as targets for import
The parentheses in the @mCustomer page list, the @mAddress page list is added to the @mOrders page list, and the Locality property on the @mAddress page list is mapped to the source property.target field indicate that the @mOrders page list is added to theBefore you map data records to properties in page lists, make sure that the .csv file that you use for data import is sorted on the record identifier column. Sorting prevents data loss in an import batch that contains records with the same record identifier.
Reprocessing of erroneous data records
You can reprocess erroneous data records by downloading a .csv file that lists the errors in your data import. The .csv file has an additional column that contains the error details for the records on each row in the file. You can fix the errors and import data again for your data type.
Downloading errors during data import
Error details for data import in a .csv file