Importing Data in Pega
Static record data can be easily uploaded and imported into PRPC. Any Data Type rule that has "Local data storage" configured enables the Actions menu button on the Records tab. Use these Actions to edit columns, import, export or show information about the underlying database table. Tip: It is perfectly okay to have more data type properties defined than corresponding table columns; in case some values don´t need storage, i.e. .pySelected relates to some Work- class rather than the abstract Data- definition.
The harder part is correctly prepping the data before you actually import. Pega advises to limit custom tables to about one hundred rows to sustain adequate system performance. We have managed to load tables with several thousands of rows depending on the row size. Our rule of thumb is to load no more than 1MB per local table. That way the associated Autocomplete control can keep up. Here are some tips and warnings when working with spreadsheet data:
- Pega expects a comma separated file [CSV] where both Windows and Unix line-endings will work
- Pega reads UTF-8 character encoding (only partly supported by Excel)
- CSV must have a header line
- Header should correspond to property identifiers (without spaces)
- Boolean values are either true or false (unlike Excel)
- Numbers use a decimal dot (.)
Excel and Encoding
A common caveat is not paying attention to character encoding. There´s one guarantee: non-ASCII characters will get messed up at some point if you just don´t care (or don´t understand). Yet another problem is that widely used Microsoft Excel does not open CSV files in UTF-8(!) Make sure you edit these files using the Import Data From Text wizard where you can explicitly choose how to parse the input. Then Save As in "Unicode Text" format and use some text editor to replace those tabs with the commas like Pega expects. Caution: The current Pega Export function contains some bug that prefixes a single space on the header line. [Edgar] (9/3/2016 2:54:20 PM)
@edgarverburgTweets by @edgarverburg
Edgar is a software engineer with experience in TIBCO Middleware and Pega Case Managemement. He holds a master's degree in Computer Science with a specialization in Data Visualization & Computer Graphics.
In his spare time Edgar reads SOS and Empire, mixes house music, blogs and writes film reviews or goes running.
Currently employed by SynTouch he is specifically looking for a PRPC project. Feel free to contact him for challenging assignments through LinkedIn.