Skip to main content

Using the Data Transform component

2 Tasks

15 mins

Visible to: All users
Beginner Pega Platform English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

In the Sample application, developers are creating new data structures in the system every day.

To ensure efficient data management, the system needs to generate unique identifiers for every new data entry. As a System Architect, create a re-usable Data Flow that automatically creates unique identifiers.

Use the following credentials to log in to the exercise system:

Role User name Password
System architect SystemArchitect rules

Your assignment consists of the following tasks:

Task 1: Create the Generate Unique IDs Data Flow

Create a new re-usable Data Flow in the Sample-Data class, named Generate Unique IDs. Ensure that both the source and the destination of the Data Flow are abstract.

Note: For the purposes of this exercise, the UniqueIDGenerator Data Transform is created for you. The UniqueIDGenerator Data Transform uses the @pxGetNewGUID() function to assign a random value to the UniqueID field.

Task 2: Preview the records in the Data Flow

Test the Data Flow to confirm that UniqueID is generated for each record.

Note: For the purposes of this exercise, the SampleData File Data Set is created for you in the Sample-Data class.

 

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Create the Generate Unique IDs Data Flow

  1. Log in as the system architect:
    1. In the User name field, enter SystemArchitect.
    2. In the Password field, enter rules.
  2. In the navigation pane of Dev Studio, click App to open the Application Explorer.
  3. In the Application Explorer, search for the Sample-Data class.
  4. In the Application Explorer, right-click on the Sample-Data class, and then click Create > Data Model > Data Flow.
  5. On the Create Data Flow rule form, create a new Data Flow:
    1. In the Label field, enter Generate Unique IDs.
    2. In the upper-right corner, click Create and open.
      Create and open
  6. On the Edit Data flow: Generate Unique IDs rule form, complete the following settings:
    1. On the canvas, on the first shape, click Add > Data Transform to add a new Data Transform component.
      Data Transform
  7. On the canvas, double-click the [Data transform] component to set up the Data Transform configurations:
  8. In the Data transform configurations window, complete the following settings:
    1. In the Name field, enter Generate Unique IDs.
    2. In the Data Transform list, enter or select UniqueIDGenerator.
    3. In the upper-right corner, click Save.

2 Preview the records in the Data Flow

  1. On the Data flow: Generate Unique IDs rule form, in the upper-right corner, click Check out.
  2. On the Edit Data flow: Generate Unique IDs rule form, right-click the Generate Unique IDs component.
    Note that the Preview option is grayed out.
    Preview
    Tip: To be able to preview the data in the components of a Data Flow, the source of the Data Flow must be a non-abstract data source. To test Data Flows that start with an abstract source, you can temporarily replace the source with a non-abstract data source.
  1. On the Edit Data flow: Generate Unique IDs rule form, configure the following settings:
    1. On the canvas, double-click the first shape to set up the source configurations.
    2. In the Source list, select Data set.
    3. In the Data set field, enter or select SampleData.
      Note: For the purposes of this exercise, the SampleData File Data Set is created for you with three sample rows.
    4. Click Submit.
    5. In the upper-right corner, click Save.
  1. On the Edit Data flow: Generate Unique IDs rule form, right-click the SampleData data set, and then select Open data set.
  2. On the Data set: Sample Data rule form, in the File preview section, note that there are three sample records.
    File preview
  3. On the Data set: Sample Data rule form, in the upper-right, close the rule to return to the GenerateUniqueIDs Data Flow.
  4. On the Edit Data flow: Generate Unique IDs rule form, right-click the Generate Unique IDs Data Transform component, and then select Preview.
    1. On the Input Data Preview window, confirm that a UniqueID is set for each record.
      UniqueID
    2. Close the Input Data Preview window.
  5. On the Data flow: Generate Unique IDs rule form, in the upper-right corner, click Discard to return to the original Data Flow record with the Abstract start shape.
    Discard


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice