Composing data in Data Flows
4 Tasks
25 mins
Beginner
Pega Platform '24.2
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:
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.
Challenge Walkthrough
Detailed Tasks
1 Create new Database Table Data Sets
- Log in as the System Architect:
- In the User name field, enter SystemArchitect.
- In the Password field, enter rules.
- In the navigation pane of Dev Studio, click App to open the Application Explorer.
- In the Application Explorer, search for the Sample-Data-Managers class.
- Right-click the Sample-Data-Managers class, then select Create > Data Model > Data Set.
- On the Create Data Set tab, create a new Data Set:
- In the Label field, enter Managers.
- In the Type list, confirm that Database Table is the default selection.
- In the upper-right corner, click Create and open.
- On the Edit Data set: Managers Rule form, in the Selectable keys section, click Add key.
- In the Selectable keys section, enter or select .DirectorID.
- In the upper-right corner, click Save.
- In the Application Explorer, search for the Sample-Data-Directors class.
- Right-click the Sample-Data-Directors class, then select Create > Data Model > Data Set.
- On the Create Data Set tab, create a new Data Set:
- In the Label field, enter Directors.
- In the Type list, confirm that Database Table is the default selection.
- In the upper-right corner, click Create and open.
- In the upper-right corner, click Save.
2 Create a new Page-list property
- In the Application Explorer, right-click the Sample-Data-Directors class, then select Create > Data Model > Property.
- On the Create Property rule form, create a new property:
- In the Label field, enter Managers.
- In the upper-right corner, click Create and open.
- On the Edit Data Property: Managers Rule form, complete the following settings:
- In the Property type section, click change.
- In the Property type window, click Page List.
- In the Page definition field, enter or select Sample-Data-Managers.
- In the upper-right corner, click Save.
3 Create a new Data Flow
- In the Application Explorer, right-click the Sample-Data-Directors class, and then select Create > Data Model > Data Flow.
- In the Create Data Flow Rule form, create a new Data Flow:
- In the Label field, enter Reporting Structure.
- In the upper-right corner, click Create and open.
- On the Edit Data flow: Reporting Structure Rule form, complete the following settings:
- On the canvas, double-click on the first shape to set up the source configurations.
- In the Source list, select Data set.
- In the Data set field. enter or select Directors.
- Click Submit.
- On the canvas, double-click on the first shape to set up the source configurations.
- On the canvas, on the first shape, click Add > Compose to add a new compose component.
- On the canvas, double-click the unconfigured (- -) component to set up the compose source configurations:
- In the Source list, select Data set.
- In the Input class list, enter or select Sample-Data-Managers.
- In the Data set list, enter or select Managers
- Click Submit.
- On the canvas, double-click the [Compose] component to set up the compose configurations:
- In the Name, enter Reporting Structure.
- In the Compose Directors with data from Manager into section, enter or select .Managers.
- In the Compose when conditions below are met section, in the first list, select DirectorID.
- In the Compose when conditions below are met section, in the second list, enter or select .DirectorID.
- Click Submit.
- In the upper-right corner, click Save.
4 Preview the records in the Data Flow
- On the Edit Data flow: Reporting Structure Rule form, right-click the Directors Data Set, and then select Preview.
- In the Input Data Preview window, review the results:
- Click the + icon to expand a few results, and then confirm that no other pages are defined.
- Close the Input Data Preview window.
- Click the + icon to expand a few results, and then confirm that no other pages are defined.
- In the Edit Data flow: Reporting Structure Rule form, right-click the Managers Data Set, and then select Preview.
- In the Input Data Preview window, review the results:
Tip: By default, the preview window shows a maximum of 10 records.
- Click the + icon to expand a few results, and then confirm that no other pages are defined.
- Close the Input Data Preview window.
- In the Input Data Preview window, review the results:
- In the Edit Data flow: Reporting Structure Rule form, right-click the Reporting Structure compose shape, and then select Preview.
- In the Input Data Preview window, validate that the manager records are successfully composed into the directors:
- In the Clipboard page: PreviewResult.pxResults(1) section, confirm that the DirectorID has a value.
- Click the + icon to expand the Results(1) page.
- Click the + icon to expand the Managers page.
- Click the Managers(1) page to confirm that the Manager record is associated with the correct DirectorID.
- Browse through the rest of the results.
- In the Clipboard page: PreviewResult.pxResults(1) section, confirm that the DirectorID has a value.
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.
Want to help us improve this content?