No foreign keys

There are no foreign keys available to use for subsetting. This can result from:

  • No foreign keys defined in the database
  • All foreign keys excluded due to table exclusions

Why this matters

Subsetting relies on foreign key relationships to traverse your database schema correctly. Without foreign keys, the subsetter cannot follow relationships between tables to maintain referential integrity.

How to fix

Define manual relationships in your options file to represent relationships between tables that aren't defined as foreign keys in the database.

Steps

  1. Identify table relationships in your database schema
  2. Add manual relationships to your options file under manualRelationships
  3. Define source and target tables with their connecting columns

Common scenarios

Missing foreign key constraints: Tables are related but database lacks formal foreign key definitions

Soft references: Tables connected through application logic rather than database constraints

Legacy databases: Older systems without proper referential integrity

Example

{
  "manualRelationships": [
    {
      "sourceTable": { "schema": "dbo", "name": "Orders" },
      "sourceColumns": ["customer_id"],
      "targetTable": { "schema": "dbo", "name": "Customers" },
      "targetColumns": ["id"]
    },
    {
      "sourceTable": { "schema": "dbo", "name": "OrderItems" },
      "sourceColumns": ["order_id"],
      "targetTable": { "schema": "dbo", "name": "Orders" },
      "targetColumns": ["id"]
    }
  ]
}



Didn't find what you were looking for?