> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/app/generation/subsetting.md).

# Subsetting data

{% hint style="info" %}
**Required workspace permission:** Configure subsetting
{% endhint %}

Subsetting generates a representative sample of your data in a way that maintains referential integrity.

You can also view this [video overview of subsetting](https://youtu.be/j0-958NyTFc).

## Subsetting overview and table filtering <a href="#overview-table-filtering" id="overview-table-filtering"></a>

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About subsetting</strong><br><br>Learn about subsetting, its components, and how subsetting generation works.</td><td><a href="/app/generation/subsetting/subsetting-about.md">About subsetting</a></td></tr><tr><td><strong>Use table filtering</strong><br><br>Instead of subsetting, some connectors allow you to add filters to tables.</td><td><a href="/app/generation/subsetting/table-filtering.md">Using table filtering for data warehouses and Spark-based data connectors</a></td></tr></tbody></table>

## Viewing and updating the subset configuration <a href="#view-update-subset-config" id="view-update-subset-config"></a>

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>View the subset configuration</strong></td><td>Review the current subset configuration.</td><td></td><td><a href="/app/generation/subsetting/subsetting-view-config.md">Viewing the current subsetting configuration</a></td></tr><tr><td><strong>Foreign keys and circular dependencies</strong></td><td>Create virtual foreign keys. Manage circular dependencies in the data.</td><td></td><td><a href="/app/generation/subsetting/subsetting-foreign-keys.md">Subsetting and foreign keys</a></td></tr><tr><td><strong>Configure subsetting</strong></td><td>Select and configure target and lookup tables.</td><td></td><td><a href="/app/generation/subsetting/subsetting-configure.md">Configuring subsetting</a></td></tr><tr><td><strong>Manage configuration inheritance</strong></td><td>Override or restore inheritance from a parent workspace to a child workspace.</td><td></td><td><a href="/app/generation/subsetting/subsetting-configuration-inheritance.md">Viewing and managing configuration inheritance</a></td></tr></tbody></table>

## Viewing subsetting steps and run results <a href="#view-subset-steps-results" id="view-subset-steps-results"></a>

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><strong>View the subset creation steps</strong><br><br>Review the path that Structural takes to identify the subset records.</td></tr><tr><td><strong>View previous subset generation runs</strong><br><br>Get the results and the configuration for previous runs of subsetting generation.</td></tr></tbody></table>

## Other resources for subset configuration

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Generate subset data from related databases</strong></td><td>Ensure that generated subsets are cohesive.</td><td></td><td><a href="/app/generation/subsetting/subsetting-cross-database-subsets.md">Generating cohesive subset data from related databases</a></td></tr><tr><td><strong>Subsetting hints and tips</strong></td><td>Hints and tips for subset configuration.</td><td></td><td><a href="/app/generation/subsetting/subsetting-hints-tips.md">Other subsetting hints and tips</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/app/generation/subsetting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
