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.1)
  • A database with an existing schema (PostgreSQL, MySQL, or SQL Server)
  • 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 the statistical distribution patterns:
This creates a profile that captures:
  • Column value distributions (age ranges, gender 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:
Flock generates:
  • Demographics: Age, gender, race, and geography distributions matching US Census data
  • Comorbidities: Realistic disease correlations (diabetes with hypertension, obesity with sleep apnea)
  • Temporal coherence: Admissions before discharges, lab orders before results
  • Family linkage: Realistic 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 is maintained. All synthetic records are tagged for easy identification and cleanup.

Step 6: Verify the results

Check that data was seeded correctly:
Or via the API:

Alternative output formats

Flock can generate data in multiple formats beyond SQL:

Clean up synthetic data

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

Next steps