Close popover

Table of Contents

Creating a File data set record for embedded files

Version:

To read data from an uploaded file in CSV or JSON format, you must configure an instance of the File date set rule.

The File data set supports two types of JSON input: the standard array format and the newline-delimited JSON format.
  1. In the New tab, in the Data Source section, click Embedded File.

  2. Upload a file:

    1. In the File management section, click Upload File.

    2. In the Upload file dialog box, click Choose file.

    3. In the Open dialog box, select the target file and click Open.

    4. In the Upload file dialog box, click Upload.

    Additional details about the uploaded file are displayed in the File section.
  3. In the Parser configuration section, update the settings for the selected file by clicking Configure automatically or by configuring the parameters manually:

    1. From the File type drop-down list, select the defined file type.

    2. For CSV files, specify if the file contains a header row by selecting the File contains header check box.

    3. For CSV files, in the Delimiter character list, select a character separating the fields in the selected file.

    4. For CSV files, in the Supported quotation marks list, select the quotation mark type used for string values in the selected file.

    5. In the Date Time format field, enter the pattern representing date and time stamps in the selected file.

      The default pattern is: yyyy - MM - dd HH : mm : ss
    6. In the Date format field, enter the pattern representing date stamps in the selected file.

      The default pattern is: yyyy - MM - dd
    7. In the Time Of Day format field, enter the pattern representing time stamps in the selected file.

      The default pattern is: HH : mm : ss
      Time properties in the selected file can be in a different time zone than the one used by Pega Platform. To avoid confusion, specify the time zone in the time properties of the file, and use the appropriate pattern in the settings.
  4. For CSV files, in the Mapping tab, check and complete the mapping between the columns in the CSV file and the corresponding properties in Pega Platform :

    • To map an existing property to a CSV file column, in the Property column, press the Down Arrow and choose the applicable item from the list.
    • For CSV files with a header row, to automatically create properties that are not in Pega Platform and map them to CSV file columns, click Create missing properties. Confirm the additional mapping by clicking Create.
    • To manually create properties that are not in Pega Platform and map them to CSV file columns, in the Property column, enter a property name that matches the Column entry, click Open, and configure the new property. For more information, see Creating a property.

    For CSV files with a header row, the Column entry in a new mapping instance must match the column name in the file.

    For JSON files, the Mapping tab is empty, because the system automatically maps the fields, and no manual mapping is available.

  5. Optional:

    Download the file that you uploaded. In the File tab, in the File download section, click Download file.

  6. Confirm the new File data set configuration by clicking Save.

    If CSV or JSON files are not valid, error messages display the reason for the error and a line number that identifies where the error is in the file.

  • Types of Data Set rules

    Learn about the types of data set rules that you can create in Pega Platform.

  • Understanding the Date, Time of Day, and DateTime property types.

    A single application can be deployed worldwide. To support varied needs for time zones and locales, three different property types are available: Date, TimeofDay, and DateTime.

  • About Data Set rules

    Data sets define collections of records, allowing you to set up instances that make use of data abstraction to represent data stored in different sources and formats. Depending on the type selected when creating a new instance, data sets represent Visual Business Director (VBD) data sources, data in database tables or data in decision data stores. Through the data management operations for each data set type, you can read, insert and remove records. Data sets are used on their own through data management operations, as part of combined data

  • Data Set rules - Completing the Create, Save As, or Specialization form

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.