# Data generator properties

Properties to configure to be able to generate automatically your test data as a dataset.

Data generator is unidirectional and can only be used as a source dataset in your pipeline.

## Data generator connection

Select Data generator connection in the list and configure the connection.

## Configuration

Select your engine from the list and set the main and advanced settings.

After configuring the connection, give it a display name (mandatory) and a description (optional).

## Data generator dataset

Dataset configurationDataset configuration

| Property | Configuration |
| --- | --- |
| Dataset name | Enter a<br>display name for the dataset. This name will be used as a unique identifier of<br>the dataset in all Talend Cloud apps. |
| Connection | Select<br>your connection in the list. If you are creating a dataset based on an existing<br>connection, this field is read-only. |
| Type | Select the type of dataset you want to create:<br><br><ul> <li> <span>Batch</span> if you want to generate records once. The                              pipeline that uses this dataset will be a batch pipeline. </li> <li> <span>Streaming</span> if you want to generate records every                              N milliseconds in a streaming pipeline. The pipeline that uses this                              dataset will be a streaming pipeline and you will be able to define                              the polling interval in milliseconds in the <span>Polling                                 configuration</span> field of the source dataset.</li> </ul> |

Main settingsMain settings

| Property | Configuration |
| --- | --- |
| Rows | Enter the number of records you want to generate. |
| Fields | Define the fields and the nature of the data to be generated. You can<br>use predefined types in order to help you generate specific data:<br><br><ul> <li> <span>Name</span>: Enter the name of the field you want to                                 generate.<div>Example: <pre><code><pre><code><code>firstname </code></code></pre></code></pre></div></li> <li> <span>Type</span>: Select in the list the data type you want                              your field to have. Depending on the type selected, additional fields                              can be displayed to configure your data.<div>Example:                                 <pre><code><pre><code><code>First Name</code></code></pre></code></pre></div></li> <li> <span>Blank %</span>: Enter or select the percentage of                              empty fields you want to generate.<p>Example:                                 <kbd>5</kbd>, so that five percent of the generated                                 first names are empty fields.</p></li> </ul> |
| Random within list | If you select this type, you can manually add random elements with<br>custom values and weights to your generated fields.<br><br>For example, you can<br>generate a field named hair\_color with three<br>elements: brown with 0.4<br>weight (40% of the generated values), red with<br>0.4 weight (40% of the generated values) and<br>blond with 0.2 weight (20% of the generated<br>values). |

Advanced settingsAdvanced settings

| Property | Configuration |
| --- | --- |
| Use seed | Enable this option if you want to use a specific seed to initialize a<br>random number generator.<br><br>Seeds allow you to keep the same<br>results.<br><br>Example: 123456 |
| Enable custom locales | Enable this option to or select in the list a custom language and<br>country code. By default, it is en-us.<br><br>You can<br>select multiple locales: in that case records will be created using the<br>different selected locales in a random way. It allows you to change the<br>value of some types according to these locales (for example address<br>records will vary according to the locale selected). |

## Data generator source dataset configuration

Fields to configure in the source dataset of your pipeline.

| Property | Configuration |
| --- | --- |
| Random rows number | Enable this option if you want to generate a random number of rows<br>according to a minimum (Minimum rows number) and a<br>maximum (Maximum rows number) number that you<br>define. |
| Polling configuration (only if you created records<br>using the streaming type) | <ul> <li>On the <span>Main</span> tab, set the time between every                              generation of a set of records in the <span>Min poll                                 interval</span> field.</li> <li>On the <span>Advanced</span> tab, set the number of records                              generated for every set in the <span>Max poll records</span>                              field. By default, it is <span>1</span>. </li> </ul> |