Using the Filter component
3 Tasks
20 mins
Beginner
Pega Platform '24.2
English
Scenario
In the Sample application, a new data structure that holds movie data is available in the Sample-Data-Movies class.
Create a new Data Flow that uses the filter component to filter out movie records with a score less than 7.0.
Role | User name | Password |
---|---|---|
System Architect | SystemArchitect | rules |
Your assignment consists of the following tasks:
Task 1: Create a new Data Flow
Create a new Data Flow in the Sample-Data-Movies class named Filter Movies.
Task 2: Preview the records in the Data Flow
Preview the data in each component.
Task 3: Run the Data Flow
Run the Data Flow to validate the numbers.
Challenge Walkthrough
Detailed Tasks
1 Create a new Data Flow
- 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-Movies class.
- In the Application Explorer, right-click the Sample-Data-Movies class, then select Create > Data Model > Data Flow.
- In the Create Data Flow rule form, create a new Data Flow:
- In the Label field, enter High Rating Movies.
- In the upper-right corner, click Create and open.
- On the Edit Data flow: High Rating Movies Rule form, complete the following settings:
- On the canvas, double-click the first shape to set up the source configurations:
- In the Source list, select Data set.
- In the Data set field. enter or select Movies.
- Click Submit.
- On the canvas, double-click the first shape to set up the source configurations:
- On the canvas, on the first shape, click Add > Filter to add a new filter component.
- On the canvas, double-click the Filter component to set up the filter configurations.
- In the Filter configurations dialog box, complete the following settings:
- In the Name field, enter High Rating Filter.
- In the Filter configurations section, click Add condition.
- In the first field, enter or select .Score.
- In the condition list, select >=.
- In the last field, enter 7.
- Click Submit.
- In the upper-right corner, click Save.
2 Preview the records in the Data Flow
- In the Edit Data flow: High Rating Movies Rule form, right-click the Movies Data Set, and then select Preview to view the results:
- In the Input Data Preview window, confirm that there are movies with a score less than 7.
- Close the Input Data Preview window.
- In the Input Data Preview window, confirm that there are movies with a score less than 7.
- In the Edit Data flow: High Rating Movies Rule form, right-click the High Rating Filter component, and then select Preview to view the results:
- In the Input Data Preview window, browse the records to confirm that all records have a score greater than or equal to 7.
- Close the Input Data Preview window.
- In the Input Data Preview window, browse the records to confirm that all records have a score greater than or equal to 7.
3 Run the Data Flow
- In the Edit Data flow: High Rating Movies Rule form, in the upper-right corner, click Actions > Run.
- On the New: Data Flow Work Item page, review the settings, and then in the upper-right corner, click Submit.
- On the Data Flow Run page, in the upper-right corner, click Start.
- After the run completes, validate the results in the Component statistics section:
- Confirm that the initial source has 19 records.
- Confirm that after applying the filter, 11 records remain.
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?