Skip to main content

Using the Filter component

3 Tasks

20 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, 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.

 

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 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-Movies class.
  4. In the Application Explorer, right-click on the Sample-Data-Movies class, then select Create > Data Model > Data Flow.
  5. On the Create Data Flow rule form, create a new Data Flow:
    1. In the Label field, enter High Rating Movies.
    2. In the upper-right corner, click Create and open.
      Create and open
  6. On the Edit Data flow: High Rating Movies rule form, complete the following settings:
    1. On the canvas, double-click on the first shape to set up the source configurations.
      High Rating Movies
    2. In the Source list, select Data set.
    3. In the Data set field. enter or select Movies.
    4. Click Submit.
  7. On the canvas, on the first shape, click Add > Filter to add a new filter component.
    Filter
  8. On the canvas, double-click the [Filter] component to set up the filter configurations:
  9. In the Filter configurations, complete the following settings:
    1. In the Name field, enter High Rating Filter.
    2. In the Filter configurations, click Add condition.
    3. In the first field, enter or select .Score.
    4. In the condition list, select >=.
    5. In the last field, enter 7.
    6. Click Submit.
      Filter 2
    7. In the upper-right corner, click Save

2 Peview the records in the Data Flow

  1. On the Edit Data flow: High Rating Movies rule form, right-click the Movies data set, then select Preview.
    1. On the Input Data Preview window, confirm that there are movies with a score less than 7.
      Input Data Preview
    2. Close the Input Data Preview window.
  2. On the Edit Data flow: High Rating Movies rule form, right-click the High Rating Filter component, then select Preview.
    1. On the Input Data Preview window, browse through the records to confirm all records have a score greater than or equal to 7.
      Input Data Preview 2
    2. Close the Input Data Preview window.

3 Run the Data Flow

  1. In the Edit Data flow: High Rating Movies Rule form, in the upper-right corner, click Actions > Run.
  2. On the New: Data Flow Work Item page, review the settings, and then in the upper-right corner, click Submit.
    The New Data Flow Work Item page
  3. On the Data Flow Run page, in the upper-right corner, click Start.
  4. After the run completes, validate the results in the Component statistics section:
    1. Confirm that the initial source has 19 records.
    2. Confirm that after applying the filter, 11 records remain.
      The results of running the Data Flow


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