Instructions for generating synthetic airline data with Synth CLI and loading it into SQLite.
When the user wants to generate synthetic data, do not run raw synth commands. Use the included Python script which handles generation, JSON processing, and database loading automatically.
Synth CLI must be installed: Run synth version to verify.
@install-synth agent or run:python3 .github/skills/install-synth/install_synth.py
Database must be initialized: Run make db-init if tables don't exist.
Run the following commands in order:
Navigate to Project Root:
cd airline-discount-ml
Run the Generation Script: This script generates data using Synth, processes the JSON, and loads it into SQLite.
python3 ../.github/skills/generate-dataset-synth/run_synth.py
With custom record count (default is 100 per table):
python3 ../.github/skills/generate-dataset-synth/run_synth.py --count 500
Generate only (no database load):
python3 ../.github/skills/generate-dataset-synth/run_synth.py --no-load
Verify Data:
sqlite3 data/airline_discount.db "SELECT COUNT(*) FROM passengers;"
sqlite3 data/airline_discount.db "SELECT COUNT(*) FROM routes;"
sqlite3 data/airline_discount.db "SELECT COUNT(*) FROM discounts;"
The Synth schema files are located in:
airline-discount-ml/synth_models/airline_data/
āāā passengers.json # Passenger profiles with travel history
āāā routes.json # Flight routes with origin/destination/distance
āāā discounts.json # Discount records linking passengers to routes
| Column | Type | Description |
|---|---|---|
| id | INTEGER | Primary key |
| name | TEXT | Faker-generated name |
| travel_history | TEXT | JSON with trips count and total_spend |
| Column | Type | Description |
|---|---|---|
| id | INTEGER | Primary key |
| origin | TEXT | 3-letter airport code |
| destination | TEXT | 3-letter airport code |
| distance | REAL | Distance in miles |
| Column | Type | Description |
|---|---|---|
| id | INTEGER | Primary key |
| passenger_id | INTEGER | FK to passengers |
| route_id | INTEGER | FK to routes |
| discount_value | REAL | Discount percentage |
@install-synth or install manually per SKILL.md in install-synth.make db-init to create tables first.synth version).