Skip to main content
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded.

Generating data using Monte Carlo data sets

Introduction

Testing any large-scale application requires large amounts of varied data. In many organizations, live data is inaccessible or scrubbed, which renders it useless. Learn how to generate a Monte Carlo data set as mock data that can be used for testing.

Video

Transcript

In this demonstration, you learn how to use a Monte Carlo data set to prepare test data that can be used in data flows and strategies.

Start by creating a data set rule of type Monte Carlo. Specify the Apply to class. In this example, it is the Customer class.

 

New data set

 

To configure the data set, select the locale and the number of records you want to generate. You can change these values later.

 

Size

 

To configure an individual data field, select a property and the method to populate that field.

Add field
Field list

The properties displayed belong to the Apply to class.

Method

There are different method types that can be used to populate each data field. The list includes standard Pega methods as well as the Monte Carlo method.

The Monte Carlo method contains a list of what are known as Providers that you select to generate records for a variety of information types.

Method list

To select a Provider, press the down arrow key. The list of all available Providers is displayed.

Select name

To narrow down the choice, enter a few characters. For example, if you type Name, you only see the Providers relating to that string.

Add a few fields and generate an address for your customer. From the Address Provider you can define a city, country, and street.

Then, using a simple expression, you can combine them into an address line. The expression can be a simple concatenation or a complex financial formula. All fields used in an expression must be declared before the expression is evaluated. The same rule applies to all other methods.

Combine

Some Providers need extra information to generate the data. In this application, the Churn Score property has a value between 0.0 and 1.0.

Extra info

The Consecutive Provider enables you to generate a unique key for each row of data. In this example, the Customer ID is prefixed by CON dash.

Prefix

Save the data set and examine the results.

Result 1
Results 2

You can change the locale and see the updated results. Locale is a set of parameters that defines the user's language, region, and any special variant preferences that the user wants to see in the interface. In this example, both the Address and Full Name are displayed in Polish locale.

You have now reached the end of this demonstration. In this demonstration, you learned how to generate mock data that can be used for testing.


This Topic is available in the following Module:

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