# Issues that prevent data generation

The following issues prevent a data generation or subsetting job.

## Structural and workspace access or permissions <a href="#data-gen-blocking-issues-access-roles" id="data-gen-blocking-issues-access-roles"></a>

<table><thead><tr><th valign="top">Issue</th><th valign="top">Description</th><th valign="top">How to resolve</th></tr></thead><tbody><tr><td valign="top">Structural license expired</td><td valign="top">The current Structural license is expired.</td><td valign="top"><a href="../../admin/on-premise-deployment/license-key-enter-update">Update the Structural license key.</a></td></tr><tr><td valign="top">No workspace configured</td><td valign="top">The Structural instance does not have any workspaces to generate data from.</td><td valign="top"><a href="../../workspace/managing-workspaces/workspaces-create-edit-delete">Create and configure a workspace.</a></td></tr><tr><td valign="top">Insufficient workspace permissions</td><td valign="top">You do not have permission to run data generation on this workspace.</td><td valign="top"><a href="../../workspace/workspace-access-management/workspace-sharing">Request access from the workspace owner or a user who has permission to manage workspace access.</a></td></tr></tbody></table>

## Source and destination data availability <a href="#data-gen-blocking-issues-data-availability" id="data-gen-blocking-issues-data-availability"></a>

<table><thead><tr><th valign="top">Issue</th><th valign="top">Description</th><th valign="top">How to resolve</th></tr></thead><tbody><tr><td valign="top">Unable to connect to the source database</td><td valign="top">The source database connection is either missing or incomplete.<br><br>If the connection uses a secret from a secrets manager, the secret is not available. For example, the authentication details might be incorrect, or the secret might not be in a valid format.</td><td valign="top"><a href="../../workspace/managing-workspaces/workspace-configuration-settings/data-connection-settings">Edit the workspace configuration to complete the source database connection.</a><br><br>For a secret from a secrets manager, verify the secrets manager configuration and the secret format.<br><br>Make sure to test the connection.</td></tr><tr><td valign="top">Unable to connect to the destination database</td><td valign="top">The destination database connection is either missing or incomplete.<br><br>If the connection uses a secret from a secrets manager, the secret is not available. For example, the authentication details might be incorrect, or the secret might not be in a valid format.</td><td valign="top"><a href="../../workspace/managing-workspaces/workspace-configuration-settings/data-connection-settings">Edit the workspace configuration to complete the destination database connection.</a><br><br>For a secret from a secrets manager, verify the secrets manager configuration and the secret format.<br><br>Make sure to test the connection.</td></tr><tr><td valign="top"><strong>Only for licenses that have a configured size limit -</strong> The source database size exceeds the maximum allowed</td><td valign="top"><strong>Only applies to licenses that are configured to enforce a maximum data size.</strong><br><br>When a Structural license is configured with a maximum source database size, then if the source database is larger than that maximum, the generation fails.</td><td valign="top">Reduce the size of the source database.</td></tr></tbody></table>

## Table mode and generator configuration <a href="#data-gen-blocking-issues-table-modes-generators" id="data-gen-blocking-issues-table-modes-generators"></a>

<table><thead><tr><th valign="top">Issue</th><th valign="top">Description</th><th valign="top">How to resolve</th></tr></thead><tbody><tr><td valign="top">Preserve Destination - cannot resolve foreign key references</td><td valign="top">A table that uses Preserve Destination mode is referenced from another table.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode for this table to De-Identify.<br><br>OR<br><br>Change the table mode of the other table to Preserve Destination.</a></td></tr><tr><td valign="top">Truncate - cannot resolve foreign key references</td><td valign="top">A table that uses Truncate mode is referenced from another table.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode for this table to De-Identify.<br><br>OR<br><br>Change the table of the other table to Truncate.</a></td></tr><tr><td valign="top">Cross Table Sum - incomplete generation</td><td valign="top">A column is assigned the Cross Table Sum generator, but some required configuration field values are missing.</td><td valign="top"><a href="../../generation/generators/generator-reference/cross-table-sum">Update the generator configuration to provide the missing values.</a></td></tr><tr><td valign="top">Incremental mode - circular foreign key dependency</td><td valign="top">There is a circular foreign key dependency between tables that use Incremental mode.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode for at least one table to De-Identify</a></td></tr></tbody></table>

## Schema changes <a href="#data-gen-blocking-issues-schema-changes" id="data-gen-blocking-issues-schema-changes"></a>

<table><thead><tr><th valign="top">Issue</th><th valign="top">Description</th><th valign="top">How to resolve</th></tr></thead><tbody><tr><td valign="top">Unresolved schema changes</td><td valign="top">There are detected schema changes that are not resolved, and the workspace is configured to block data generation on those schema changes.</td><td valign="top"><a href="../../generation/schema-changes">Go to <strong>Schema Changes</strong> to identify and resolve the changes.</a></td></tr></tbody></table>

## Subsetting configuration <a href="#data-gen-blocking-issues-subsetting" id="data-gen-blocking-issues-subsetting"></a>

The following errors occur when you attempt to generate a subset. They do not apply if **Use subsetting** is turned off.

<table><thead><tr><th valign="top">Issue</th><th valign="top">Description</th><th valign="top">How to resolve</th></tr></thead><tbody><tr><td valign="top">No target tables configured</td><td valign="top">The subsetting configuration does not include any target tables.</td><td valign="top"><a href="../../../generation/subsetting/subsetting-configure#subsetting-configure-target-tables">Add at least one target table to the subsetting configuration.</a></td></tr><tr><td valign="top">Invalid target table configuration</td><td valign="top">A target table has an invalid percentage value or <code>WHERE</code> clause.</td><td valign="top"><a href="../../../generation/subsetting/subsetting-configure#subsetting-configure-target-tables">Update the subsetting configuration to correct the target table percentage or where clause.</a></td></tr><tr><td valign="top">In-subset table uses Truncate mode.</td><td valign="top"> A table that is in the subset uses Truncate table mode.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode to De-Identify.</a></td></tr><tr><td valign="top">In-subset table uses Preserve Destination mode.</td><td valign="top">A table that is in the subset uses Preserve Destination table mode.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode to De-Identify.</a></td></tr><tr><td valign="top">In-subset table uses Incremental mode.</td><td valign="top">A table that is in the subset uses Incremental table mode.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode to De-Identify.</a></td></tr></tbody></table>

## Upsert issues <a href="#data-gen-blocking-issues-upsert" id="data-gen-blocking-issues-upsert"></a>

When upsert is enabled, the following issues cause the upsert job to fail.

<table><thead><tr><th valign="top">Issue</th><th valign="top">Description</th><th valign="top">How to resolve</th></tr></thead><tbody><tr><td valign="top">Destination database not populated</td><td valign="top">The destination database is empty.</td><td valign="top"><a href="../../../workspace/managing-workspaces/workspace-configuration-settings/workspace-config-upsert#workspace-config-upsert-enable">Update the workspace to disable upsert</a>, then <a href="data-generation-manual">run a regular data generation job to populate the destination database</a>.<br><br>You can then re-enable upsert.</td></tr><tr><td valign="top">Invalid table mode</td><td valign="top">A table is assigned a mode other than De-Identify or Truncate.</td><td valign="top"><a href="../../../generation/table-modes#table-mode-selection">Change the table mode to De-Identify or Truncate.</a></td></tr><tr><td valign="top">Unable to connect to the intermediate database</td><td valign="top">The intermediate database connection is either missing or incomplete.</td><td valign="top"><a href="../../../workspace/managing-workspaces/workspace-configuration-settings/workspace-config-upsert#connecting-to-the-intermediate-database">Edit the workspace configuration to complete the intermediate database connection.</a></td></tr><tr><td valign="top">Unresolved schema conflicts</td><td valign="top">There are schema conflicts between the source and destination databases.</td><td valign="top">Update the source or destination database schema to resolve the changes.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/workflows/data-generation-run-job/data-generation-issues.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
