Running a data generation job

The data generation job uses the configured tables modes and generators to transform the data in the source database. The transformed data is used to create the destination database.
You use the Generate Data button at the top right of the workspace management view to start the data generation.
If you configured subsetting, then you can choose whether to generate only the subset.

Running the data generation job

As you configure the data generation options, Tonic runs checks to verify that you can use the current configuration to generate data.
If any of these checks do not pass, then when you click Generate Data, Tonic displays information about why you cannot run the data generation job.
If all of those checks pass, then when you click Generate Data, if there are no warnings, the Confirm Generation panel displays.

Warning for non-conflicting schema changes

Data generation is always blocked by conflicting schema changes.
The workspace configuration includes whether to block data generation for all schema changes, including non-conflicting changes.
If this setting is turned off, then if there are non-conflicting schema changes, when you click Generate Data, a warning displays. Non-conflicting schema changes include new tables and columns. If the new columns contain sensitive data, then if you do not assign generators before you generate data, that sensitive data will be in the destination database.
If you are sure that the data in the new tables and columns is not sensitive, then to continue to the Confirm Generation panel, click Continue to Data Generation.

Confirming the generation details

The Confirm Generation panel allows you to confirm the details for the data generation.If subsetting is configured you can also determine whether to generate the subset. Tonic can also provide tips on improving the data generation performance.
Confirm Generation panel

Indicating whether to generate a subset

If you configured subsetting, then you can indicate whether to only generate the subset.
To create a subset based on the current subsetting configuration, toggle Use Subsetting to the on position.
The initial setting matches the current setting in the subsetting configuration. If Use subsetting is turned on on the Subsetting view, then it is on by default on the Generation Confirmation panel.
When you change the setting on the generation confirmation panel, it also updates the setting on the Subsetting view.

Verifying the destination database connection information

The Confirm Generation panel displays the connection information for the destination database.
If the destination database information is incorrect, to navigate to the workspace configuration view to make updates, click Edit Destination DB.

Viewing generation performance tips

For data generation, assigning Truncate table mode to tables that you don't need data for can improve generation performance.
For subsetting, if an upstream table is very large, and the foreign key columns are not indexed, then it can make the subsetting process run more slowly.
The Want Faster Generations? message displays at the bottom of the Confirm Generation panel. It displays for all non-subsetting jobs. For subsetting jobs, the panel only displays if Tonic identified columns that you should consider indexing.
To display information about tips for faster generation, click Generation Tips.

Viewing suggested columns to index

On the Generation Tips panel for subsetting jobs, the Add Indexes panel displays the first few columns that you might consider indexing.
Generation Tips panel with indexing suggestions
To display a panel with a suggested SQL command to add the index, click the information icon next to the column.
Example SQL command for indexing
On the panel, to copy the command to the clipboard, click Copy SQL to Clipboard.
If there are additional columns that are not listed, then to display the full list of columns to index, click Show all columns.
Full list of indexing suggestions
On the full list, to download the list to a CSV file, click Download list of columns (.csv).

Hint to truncate tables

On the Generation Tips panel for non-subsetting jobs, the Truncate Tables panel displays the hint to truncate tables that contain data that you do not need in the destination database.
To navigate to Database View to change the current configuration, click Go to Database View.

Starting the generation job

On the Confirm Generation panel, after you confirm the generation details, to start the data generation, click Run Generation.
Tonic displays a notification that the job has started. To track the progress of the data generation job and view the results, click the View Job button on the notification, or go to the Job History view.

Issues that prevent data generation and subsetting

The following issues prevent a data generation or subsetting job.

Tonic and workspace access or role

How to resolve
Tonic license expired
The current Tonic license is expired.
No workspace configured
The Tonic instance does not have any workspaces to generate data from.
Insufficient workspace role
You are not either the owner or an editor of the workspace.

Source and destination data availability

How to resolve
Unable to connect to the source database
The source database connection is either missing or incomplete.
Unable to connect to the destination database
The destination database connection is either missing or incomplete.

Table mode and generator configuration

How to resolve
Scale mode - Invalid generators
A table that uses Scale mode has columns with assigned generators that are not valid for Scale mode.
Change the selected generator for the columns.
Scale mode - Passthrough generator or sub-generator for the Conditional generator
A table that uses Scale mode has columns that use the Conditional generator, and that are assigned Passthrough as a generator or sub-generator.
Change the selected generator, sub-generator, or default generator.
Preserve Destination - cannot resolve foreign key references
A table that uses Preserve Destination mode is referenced from another table.
Truncate - cannot resolve foreign key references
A table that uses Truncate mode is referenced from another table.
Cross Table Sum - incomplete generation
A column is assigned the Cross Table Sum generator, but some required configuration field values are missing.
Incremental mode - circular foreign key dependency
There is a circular foreign key dependency between tables that use Incremental mode.
AI Synthesizer configured when it is disabled
A table is configured to use the AI Synthesizer, but the AI Synthesizer is not enabled.
Set the environment variable TONIC_NN_GENERATOR_ENABLED to true. OR Remove the AI Synthesizer from the generator configuration.

Schema changes

How to resolve
Unresolved schema changes
There are detected schema changes that are not resolved.

Subsetting configuration

The following errors occur when you attempt to generate a subset. They do not apply if Use subsetting is turned off.
How to resolve
No target tables configured
The subsetting configuration does not include any target tables.
Invalid target table configuration
A target table has an invalid percentage value or WHERE clause.
In-subset table uses Scale mode
A table that is in the subset uses Scale table mode.
In-subset table uses Truncate mode.
A table that is in the subset uses Truncate table mode.
In-subset table uses Preserve Destination mode.
A table that is in the subset uses Preserve Destination table mode.
In-subset table uses Incremental mode.
A table that is in the subset uses Incremental table mode.