Skip to main content
An empty test database doesn’t catch real bugs. A database full of copied production data is a compliance violation. Flock gives you the third option: realistic synthetic populations seeded directly into your schema.

Prerequisites

  • Pidgeon CLI installed (dotnet tool install --global Pidgeon.CLI --version 0.1.0-beta.2), plus the Flock desktop app or Pro CLI (the flock command is not in the free community build)
  • A database with an existing schema (PostgreSQL, SQL Server, or MySQL)
  • Database credentials with read/write access

Step 1: Connect to your database

Flock analyzes the schema and reports:
  • Tables classified as patient, encounter, clinical, financial, or reference
  • Foreign key relationships mapped
  • Column types and constraints detected

Step 2: Learn patterns from existing data (optional)

If your database already has sample data, Flock can learn its statistical distributions:
This creates a profile that captures:
  • Column value distributions (age ranges, sex ratios)
  • Referential patterns (which diagnosis codes appear together)
  • Temporal patterns (encounter durations, admission-to-discharge intervals)

Step 3: Generate a synthetic population

Generate 1,000 patients with related records, writing them to a directory the seed step can read:
Flock generates:
  • Demographics: age, sex, race, and geography distributions matching US Census data
  • Correlated conditions: realistic disease correlations (diabetes with hypertension, obesity with sleep apnea)
  • Temporal coherence: admissions before discharges, lab orders before results
  • Family linkage: household structures and family relationships

Step 4: Preview with dry-run

Before writing anything, preview the generated SQL:
This outputs the SQL INSERT statements in foreign-key order without executing them. Review to confirm the data looks correct.

Step 5: Seed the database

Flock inserts records in FK-dependency order so referential integrity holds, and reports the rows inserted per table. All synthetic records are tagged for later identification and cleanup.

Step 6: Verify the results

The seed command prints an FK-safe insert summary (rows per table, in dependency order). To confirm independently, count the tagged rows in your database:

Alternative output formats

Flock can generate data in formats beyond SQL:

Clean up synthetic data

Remove all Flock-generated records when you’re done:
Or via the API:
Cleanup removes every record tagged as synthetic. This cannot be undone.

Next steps