Row Generator Stage Example

The Row Generator stage is a Development/Debug stage.

The Row Generator Stage has no input links, and a single output link.

The Row Generator stage produces a set of mock data fitting the specified metadata. This is useful where you want to test your job but have no real data available to process. (See also the Column Generator stage which allows you to add extra columns to existing data set.

On Columns tab, load or specify column definitions

·         Open Extended Properties window to specify the values to be generated for that column.

·         A number of algorithms for generating values are available depending upon the data type. 

Example:

In below example we are going to generate some mock data as an Employee details i.e. EmpID, EmpName etc in a target Dataset.

Follow below steps:

Design you job same as shown below:

jobDs - Row Generator Stage Example

Open the Properties window of Row generator stage by double click on it or select properties from drop down by Right Clickàselect Properties to open it and Under Output tab, select Properties and select the Number of Records like below.

1 2 - Row Generator Stage Example

Select the Columns tab under Output tab and provide the column definitions for the target.

2 2 - Row Generator Stage Example

Open the Extended Properties of EmpID column under Columns of Output tab like below:

5 1 - Row Generator Stage Example

Under the Extended Properties of EmpID column select the algorithm to generate the value like Cycle having initial value as 1001 and incrementing by 1 as below:

6 - Row Generator Stage Example

Similarly for EmpName column and select the algorithm to generate the value like below:

7 - Row Generator Stage Example

Similarly for EmpAddr column and select the algorithm ‘alphabet’ to generate the random value like below:

8 - Row Generator Stage Example

Similarly for EmpContact column and select the algorithm to generate the random values of limit 10 digits like below:

9 - Row Generator Stage Example

Similarly for JoinDate column and select the Current Date to generate the current date to the column values like below:

10 - Row Generator Stage Example

Configure the target dataset to capture the mock data.

3 1 - Row Generator Stage Example

Save the job and Compile and run the job. After successful job run we can see 10 rows has been generated in target dataset.

Row output - Row Generator Stage Example

Output Data:

After successful job run, View the data from the target Dataset.

resultdata - Row Generator Stage Example