Skip to main content

Composing data in Data Flows

4 Tasks

25 mins

Visible to: All users
Beginner Pega Platform English

Scenario

In the Sample application, two data structures exist:

  • Directors: Sample-Data-Directors
  • Managers: Sample-Data-Managers

Along with the data structures, two database table Data Sets are available.

The following figure shows the entity relationship between the two data structures:

Two data structures

 

Create a new Data Flow to compose the director data with the manager data that represents the reporting structure.

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 new Database Table Data Sets

Create a new Database Table Data Set in the Sample-Data-Managers class named Managers that uses the ManagerID and DirectorID as its keys.

Then, create a new database table Data Set in the Sample-Data-Directors class named Directors that uses the DirectorID as its key.

Task 2: Create a new Page-list property

Create a Page-list property in the Sample-Data-Directors named Managers.

Task 3: Create a new Data Flow

Create a new Data Flow named Reporting Structure that composes the two data sources.

Task 4: Preview the records in the Data Flow

Preview the data in each component to validate that the compose operation is successful.

 

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 new Database Table Data Sets

  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-Managers class.
  4. Right-click the Sample-Data-Managers class, then select Create > Data Model > Data Set.
  5. On the Create Data Set tab, create a new Data Set:
    1. In the Label field, enter Managers.
    2. In the Type list, confirm that Database Table is the default selection.
    3. In the upper-right corner, click Create and open.
      The creation of the Managers Data Set
  6. On the Edit Data set: Managers Rule form, in the Selectable keys section, click Add key.
  7. In the Selectable keys section, enter or select .DirectorID.
  8. In the upper-right corner, click Save.
    Adding the DirectorID key
  9. In the Application Explorer, search for the Sample-Data-Directors class.
  10. Right-click the Sample-Data-Directors class, then select Create > Data Model > Data Set.
  11. On the Create Data Set tab, create a new Data Set:
    1. In the Label field, enter Directors.
    2. In the Type list, confirm that Database Table is the default selection.
    3. In the upper-right corner, click Create and open.
      Creation of the Directors Data Set
  12. In the upper-right corner, click Save.

2 Create a new Page-list property

  1. In the Application Explorer, right-click the Sample-Data-Directors class, then select Create > Data Model > Property.
  2. On the Create Property rule form, create a new property:
    1. In the Label field, enter Managers.
    2. In the upper-right corner, click Create and open.
  3. On the Edit Data Property: Managers Rule form, complete the following settings:
    1. In the Property type section, click change.
    2. In the Property type window, click Page List.
      Page List property configuration
    3. In the Page definition field, enter or select Sample-Data-Managers.
      The Sample-Data-Managers page definition
  4. In the upper-right corner, click Save.

3 Create a new Data Flow

  1. In the Application Explorer, right-click the Sample-Data-Directors class, and then select Create > Data Model > Data Flow.
  2. In the Create Data Flow Rule form, create a new Data Flow:
    1. In the Label field, enter Reporting Structure.
    2. In the upper-right corner, click Create and open.
  3. On the Edit Data flow: Reporting Structure Rule form, complete the following settings:
    1. On the canvas, double-click on the first shape to set up the source configurations.
      The Sample-Data-Directors shape
    2. In the Source list, select Data set.
    3. In the Data set field. enter or select Directors.
    4. Click Submit.
  4. On the canvas, on the first shape, click Add > Compose to add a new compose component.
    The Compose option
  5. On the canvas, double-click the unconfigured (- -) component to set up the compose source configurations:
    1. In the Source list, select Data set.
    2. In the Input class list, enter or select Sample-Data-Managers.
    3. In the Data set list, enter or select Managers
    4. Click Submit.
      The Source configurations dialog box
  6. On the canvas, double-click the [Compose] component to set up the compose configurations:
    1. In the Name, enter Reporting Structure.
    2. In the Compose Directors with data from Manager into section, enter or select .Managers.
    3. In the Compose when conditions below are met section, in the first list, select DirectorID.
    4. In the Compose when conditions below are met section, in the second list, enter or select .DirectorID.
    5. Click Submit.
      The Compose configurations dialog box
    6. In the upper-right corner, click Save.

4 Preview the records in the Data Flow

  1. On the Edit Data flow: Reporting Structure Rule form, right-click the Directors Data Set, and then select Preview.
    The Preview option in the Data Flow canvas
  2. In the Input Data Preview window, review the results:
    1. Click the + icon to expand a few results, and then confirm that no other pages are defined.
      plus icon
    2. Close the Input Data Preview window.
  3. In the Edit Data flow: Reporting Structure Rule form, right-click the Managers Data Set, and then select Preview.
    1. In the Input Data Preview window, review the results:
      Tip: By default, the preview window shows a maximum of 10 records.
    2. Click the + icon to expand a few results, and then confirm that no other pages are defined.
      plus icon 2
    3. Close the Input Data Preview window.
  4. In the Edit Data flow: Reporting Structure Rule form, right-click the Reporting Structure compose shape, and then select Preview.
  5. In the Input Data Preview window, validate that the manager records are successfully composed into the directors:
    1. In the Clipboard page: PreviewResult.pxResults(1) section, confirm that the DirectorID has a value.
      PreviewResultpxResults1 section
    2. Click the + icon to expand the Results(1) page.
    3. Click the + icon to expand the Managers page.
    4. Click the Managers(1) page to confirm that the Manager record is associated with the correct DirectorID.
      The Managers1 page
    5. Browse through the rest of the results.
      The results on the Managers2 page
       
      The results on the Managers3 page

This Challenge is to practice what you learned in the following Module:


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