Redgate Test Data Manager

Subsetting treatments

What is a Subsetting treatment?

A subsetting treatment creates a smaller, referentially intact copy of your database. When you create a subsetting treatment, Test Data Manager analyzes your database structure and extracts a representative slice of data while maintaining all foreign key relationships.

Treatments are reusable, once created, you can run them multiple times against databases with the same schema.

Use non-production databases only: Subsetting requires both a source database (to extract data from) and a target database (to copy the subset to). They should be exact schema copies. Ensure both are non-production environments.

Best Practices

Verify foreign keys first: Use this guide to check your database has proper relationships defined

Exclude problematic tables: If certain tables cause errors (unsupported data types, self-references, permission issues), exclude them in the Subsetting tab by toggling the Exclude switch

Start small: Test with a 10% subset before running larger operations

✅ Prepare target databases: Ensure target databases have the same schema as the source (see Create an empty target database)

Test filter clauses: When using starting tables with filters, test your SQL filter clauses against the source database first

Use descriptive names: Include environment and purpose in treatment names (e.g., "Dev_Orders_Q1_2024")

→ Creating a subsetting treatment
→ Configuring desired size subsetting
→ Configuring starting tables subsetting
→ Running a subsetting treatment
→ Download for CLI use
→ Troubleshooting

Related topics

- Learn about anonymization treatments
- Explore CLI automation


Didn't find what you were looking for?