Online Documentation for Data Generator for SQL Server

STRING column parameters


Strings are used for text data storage. The values are sorted and compared on the basis of the collation of the character set assigned to the column. Values for this column can be generated randomly (with constraints or mask used), incrementally, or they can be taken from a fixed list of values or SQL query, or from an existing table column of the same data type.

 

The Generation properties panel allows you to define preferences for generating string values for string-based types.

 

String field parameters

 

 

Select Data generation mode as follows:

 

RadioButton Generate random data

String random data can be generated in two ways - by using constraints or by typing the mask.

 

  • Using constraints

Set the Min length, Max length values to define the minimum and the maximum length for generated values. You can also specify the Start char and the End char segments to be used for string values generation.

 

String field parameters - Mode - Random data

 

 

  • Using mask

Check the option to generate values by mask. Use the Masks window to create and edit various masks for string data generation:

- the 'A' and the 'a' characters are replaced with a random letter (from 'A' to 'Z' and from 'a' to 'z');

- the 'N' character is replaced with a random digit;

- '{n}' results in iteration of the last sign n times;

- the character after the '\' symbol is interpreted as a common character.

All the rest of the mask characters will be moved to the result value without changes.

 

String field parameters - Mode - Random data - Masks

 

 

RadioButton Generate incremental data

Specify the Initial value and the Increment properties to generate an ordered incremented sequence of values.

 

String field parameters - Mode - Incremental data

 

 

RadioButton Get data from list / SQL query

This panel allows you to define the list of values to generate string data from. You can enter these values directly into the editor by selecting the List of Values option.

To add a single value, use the btnListAddValue Add Value button.

To load a list of values from an existing external file, use the btnListLoadFromFile Load from file button.

To save the list to an external file, use the btnListSaveToFile Save to file button.

To remove a single value, use the btnListDeleteValue Delete Value button.

To remove all items from the list, use the btnListClear Clear button.

 

You can also specify whether the values are to be taken in random order or in the order they have been inputted.

 

Alternatively, you can set the SQL Query option and input an SQL query into the editor, and the resulting dataset will be used as the list for data generation.

 

Use of the Sample text option allows you to generate fragments of previously defined text into the string type column. To define sample text used by default, see the Default constraints section of the Preferences dialog.

 

String field parameters - Mode - List or query

 

 

RadioButton Get data from column

This option allows you to specify a column to generate data from: use the Table and Column drop-down lists to select the source table and column that will be used to take data for generation.

 

String field parameters - Mode - Field