Creating a File data set record

You must configure each instance of the File data set rule to read data from a file in CSV or JSON format.

Note: The File data set supports two types of JSON input, standard array format and newline-delimited JSON.
  1. Create an instance of the File data set rule.

  2. Upload a file.

    Note: The file size that can be uploaded is limited. To check the system limits, see System limits and maximums.
    1. Click Upload file.

    2. In the Upload file dialog box, browse for a CSV or JSON file and click Upload.

    After the file is uploaded, the sections in the File tab are updated with additional details:

    • The File management section, with a time stamp when the file was uploaded.

    • The File download section, with the file name and size, a number of fields (only for CSV files), and a number of records that are in the uploaded file.

    • The File preview section, with a preview of the first 100 KB of data in the uploaded file. The file preview can be helpful in setting appropriate options.

  3. Specify additional settings in the Content section.

    Note: The system identifies the appropriate settings and automatically populates the fields in this section. You can modify the settings, if necessary.
    1. Enter the uploaded file type. The file can be only in CSV or JSON format.

    2. Configure additional settings.

      • CSV

        • In the Delimiter character list, select a character that separates the fields in the uploaded file.

        • Optional: In the Supported quotation marks list, select the quotation mark type that is used for string values in the uploaded file.

      • CSV and JSON

        • Optional: In the Date Time format field, enter the pattern that is used in the uploaded file to represent date and time stamps. The default pattern is: yyyy-MM-dd HH:mm:ss.

        • Optional: In the Date format field, enter the pattern that is used in the uploaded file to represent date stamps. The default pattern is: yyyy-MM-dd.

        • Optional: In the Time Of Day format field, enter the pattern used in the uploaded file to represent time stamps. The default pattern is: HH:mm:ss.

        Note: Time properties in the uploaded file can be in a different time zone from the time zone used by Pega Platform. To avoid confusion, specify the time zone in the time properties in the file, and use the appropriate pattern in the settings.
  4. Click the Mapping tab.

    • CSV

      • Check configuration for mapping between the fields in the CSV file and properties in the Pega Platform. The system automatically maps the fields based on the header row in the file.

      • Optional: To manually overwrite the mapping, in the Property field, enter a target property that corresponds to a column in the CSV file. You can also leave the field blank.

        Note: You cannot add, remove, or reorder rows.
    • JSON

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

  5. Click Save.

    Note: For invalid CSV or JSON files, errors are displayed that indicate the reason for the error and a line number where the error is present in the file.
  6. Optional: After you save the rule form, you can download the file that you uploaded in the File download section in the File tab.