Redgate Test Data Manager

Configuring starting tables subsetting

What are starting tables?

  • Specify tables and filter clauses to start from
  • TDM follows foreign key relationships
  • Collects all related data

Specify one or more tables and optional filter clauses to start from. Test Data Manager follows foreign key relationships from these starting points, collecting all related data.

When to use:

  • You need specific data (e.g., "All orders for customers in London")
  • You're testing features that require particular records
  • You want precise control over included data

How to configure:

  1. Select Custom from the Subsetting option dropdown
  2. Click Add starting table (you'll see a prompt if no starting tables are defined yet)
  3. Search for and select a table from the list
  4. The table will be marked with a "Starting table" badge
  5. (Optional) Click on the table to add a Filter clause (SQL WHERE condition)
  6. (Optional) Toggle Exclude for tables you want to omit from the subset
  7. Click Save

Adding Filter Clauses

When you click on a starting table, you can define a SQL filter clause:

Example filter clauses:

  • city = 'london' - Only customers in London
  • OrderDate > '2024-01-01' - Orders from 2024 onwards
  • Status = 'Active' - Only active records
Filter clause syntax: Write your filter as you would in a SQL WHERE clause, with or without the WHERE keyword. For example: city = 'london' or WHERE city = 'london'.

Advanced example filter clauses

Example: "All orders for customers in London from 2024"

Starting table: Orders
Filter clause: OrderDate > '2024-01-01' AND CustomerID IN (SELECT CustomerID FROM Customers WHERE City = 'London')

What TDM does:
- Finds matching Orders rows
- Follows foreign keys to Customers
- Collects related OrderDetails
- Includes related Products, Shipping, etc.

Excluding Tables

You can exclude specific tables from your subset:

  1. Find the table in the list on the Subsetting tab
  2. Toggle the Exclude switch to the right
  3. Click Save
Cascading exclusions: Tables that have foreign keys referencing an excluded table will also be excluded automatically. 

Why exclude tables?

  • Tables with unsupported data types
  • Large tables that aren't needed for testing
  • Tables with permission issues
  • Audit or logging tables that aren't relevant

Next steps

 Once configured, you're ready to run
→ Running a subsetting treatment

Related pages

← Back to Creating a subsetting treatment
→ Alternative: Configuring desired size subsetting
→ Running a subsetting treatment


Didn't find what you were looking for?