Using the Filter component
3 Tasks
20 mins
Beginner
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 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 on the Sample-Data-Movies class, then select Create > Data Model > Data Flow.
- On 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 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 Movies.
- 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 > 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, complete the following settings:
- In the Name field, enter High Rating Filter.
- In the Filter configurations, 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 Peview the records in the Data Flow
- On the Edit Data flow: High Rating Movies rule form, right-click the Movies data set, then select Preview.
- On the Input Data Preview window, confirm that there are movies with a score less than 7.
- Close the Input Data Preview window.
- On the Input Data Preview window, confirm that there are movies with a score less than 7.
- On the Edit Data flow: High Rating Movies rule form, right-click the High Rating Filter component, then select Preview.
- On the Input Data Preview window, browse through the records to confirm all records have a score greater than or equal to 7.
- Close the Input Data Preview window.
- On the Input Data Preview window, browse through the records to confirm 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.
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?