Project - Data Settings

Previous  Top  Next

The Data Settings tab is where you create your data generation project. Besides the name and description (and options), a project lists items (tables, procedures, custom SQL statements) and columns/parameters that it needs to fill with data. The items can be arranged in a specific order, so that parent <-> child relationships (or master <-> detail relationships) can be established while generating data.

 

Example of the "Data Settings" tab

 

The Data Settings tab holds 3 areas:

1.Database Schema
2.Item Settings
3.Column/Parameter Settings

 

Below is a description of each of these areas.

 

This dialog can be closed by using the OK or Cancel buttons so save or not save, respectively, your changes to the project.

 

Database Schema

This is the area where the Advanced Data Generator shows Tables, Stored Procedures and Custom SQL Statements. For each item in this tree-view, there are item settings and column/parameter settings. Expand the item by using the (+) sign in front of it and columns or parameters will be displayed.

 

Whenever you decide to use an item, check the empty box in front of it, the item name will become boldfaced and the number of rows is displayed behind it. You can change the number of rows in the item settings.

 

For each column or parameter, a new line is displayed under the main item. If a column has no options defined yet, the icon has a red question mark displayed, if settings are defined, this icon changes so it includes a green check-mark.

 

Back to top.

 

 

Item Settings

The Item Settings area contains three tabs, Rows, Events and Lookups.

 

Rows

There are 3 different ways to "process an item":

Fixed number of rows

Generate a fixed number of rows for this item, as specified.

Random number of rows

Generate a random number of rows as between the specified boundaries.

For each in...

Generate a random number of rows as between the specified boundaries for each row available in a "master item". Useful for generating controlled master/detail data, see the How To section for an example.

 

The following item settings are available, depending on the above option:

Rows to generate

The number of times this item should be used to generate a row. If, for some reason, generating a row fails, this will still count towards this limit.

Between... and...

The boundaries for a random number of rows.

Master item

The item that will be used to "cycle" and determine how many times this (detail) item needs to be processed.

Rows per transaction

The number of rows before a "COMMIT" is being executed. If this value equals 0, all rows are generated inside a single transaction.

Empty table before generating

Tells the Advanced Data Generator to perform a DELETE of all rows before generating new data, only available for tables. Also see the Project Settings.

 

Events

You can use the Before SQL and After SQL events to execute a custom SQL statement before processing the item and after processing the item.

 

Lookups

Lookups are used to get proper multi-column referential links or data from an external data source like CSV Files. More information about how to set up lookups is available in the Lookups chapter.

 

Back to top.

 

Column/Parameter Settings

Using a table or stored procedure is pretty straightforward, expand the item and its columns or parameters become visible. For each column or parameter, select a way to fill it.

 

For information on using Custom SQL Statements in projects, see Custom SQL Statements.

 

The available column/parameter settings differ for each data type, however, the following settings are common for all data types:

Fill with

What kind of data gets generated for the specified column.

Include NULL's

If the column is not created with the "required" attribute, you can tell the Advanced Data Generator to generate NULL's for the column as well and specify the percentage of NULL's that approximately gets generated.

 

Depending on the data type, one or more methods of data-generation are available. Below is an explanation of each method:

Template

One of the user-defined templates. See Introduction to Templates for more information.

Referential Link

A random value taken from another table/view and column. Select a table/view from the drop down box and a column. Usually, the column is the primary key of another table. Compound primary keys are not supported, but when selecting "Sequential" you can make sure that values from multiple columns get inserted for the same child row.

 

When fetching the data, it's ordered by the primary key values - if available - or as defined by the Order By option.

 

Options:

Random: grab a random value from the referred table
Sequential: start at the first entry and go down the list
Unique: grab an entry and remove it from the available items list. This allows 1-1 relationships to be created.
Different from: in order to make sure this value isn't the same as another value for this row of data.
Order by: optionally specify a custom ORDER BY clause when fetching the data.
Where clause: optional filter when fetching the data.

 

Also see "select-modes".

 

To use multi-column referential links, set up a Lookup.

Value from lookup

See lookups.

Column value from "master"

Available when using "For each in ..." type of data generation for this item. This allows you to take a single column value from the current master iteration.

Fixed Value

Use the specified value for each row (unless Include NULLs is checked) in the table.

Random Values

A random value, might be generated with the use of entered parameters. For text (strings), see section Random Strings.

Value From List

A random value from the list entered by the user. Also see "select-modes".

Value From File

A random value taken from the supplied file. Each value needs to be on a new line.

Increasing Values

A value that's being incremented for each new row. Failed rows (for any reason) will create gaps. The value starts at the start value entered by the user and is incremented in steps as entered by the user.

Link to sequence/generator

Currently only available in the InterBase and Firebird Editions, this allows you to select a Generator to be used to generate sequential numbers for a column.

File from Folder

Takes a random file from the given folder, according to the file filter (only for Large Binary).

Copy other column/parameter

 

Copies the newly generated value from the given column or parameter to this column or parameter.

Variable value

These are values calculated when preparing for insertion for this particular table. The options are different depending on the data type.

Value from Stored Routine

Take the value of an output parameter or result from a Stored Procedure or Stored Function.

Value based on another column/parameter

Take the value of a newly generated value from the given column or parameter, modify it and use it as the new value for this column or parameter.

 

eg: duration

 

Random Strings

The Advanced Data Generator can be used to generate complex string data. When generating random strings, the following options are available:

Random Values

A randomly generated string with a length between the specified values. Use the same values to generate a fixed-length string value. Single characters are taken from the "printable" range of characters.

 

For Large Text, this will be so-called "Lorem Ipsum" text, with the given number of paragraphs.

Random GUID

A global unique identifier (GUID).

Example: {E2B6008E-24CE-4412-907F-5A764C033E02}

Random URL's

Creates random URL's from a set of top level domains and domains.

Random e-mail address

Creates a random email address take from a random last-name, random top level domain and a random provider name.

Random address

Creates a random street-address by taking a random street name from a data library and concatenating it with a (house) number.

Random full names

Creates a random first-name + last-name combination by taking both from a data library.

Macro

A powerful way to create custom values. See Macro Values for more information.

Data Library

Takes a random value from the specified data library. See Data Library for more information.

 

Select-Modes

For options that use a list (eg: "Values from List" or "Referential Link"), there's a drop down box with "select modes", the following modes are available:

Random

Selects a random entry from the list, entries can be re-used.

Sequential

Starting at the first item, for each iteration, the next item in the list will be used. The Wrap option will be available and allows for a re-start at the first item if the number of iterations exceeds the number of items in the list.

Unique

Selects a random entry from the list, but removes the entry as well so that entries cannot be re-used. If the number of iterations exceeds the number of items in the list, the data generation process for this table, procedure or custom SQL statement will be stopped.

 

Back to top.

 

Notes:

Large Binary values means a file, not an OLE object.
Files are pre-loaded into memory, this might take up lots of memory when using larger files.
Values from a file/list should have each value on a new line.