Luna

← All examples

E-commerce orders test data

Customers, products, orders and order items with consistent foreign keys, order dates after sign-up, and realistic basket sizes.

Typical uses: Integration tests for checkout, order history and reporting queries; seeding a staging shop; demoing dashboards without customer data.

Download sample ZIP (CSV per table + schema.json + spec.json + quality.json, small run, seed 2026)

Checks on this sample: foreign-key integrity 100.0%, time order 100.0%. Full details in quality.json.

Tables

TableColumnsForeign keysRows in sampleRows in full schema
customers7–1002000
products5–15300
orders7customer_id → customers.customer_id4008000
order_items5order_id → orders.order_id, product_id → products.product_id100020000

Schema (input)

This is everything the API needs. Copy it into the free preview or send it to POST /v1/generate. Adjust names and row counts to match your database.

{
 "tables": [
  {
   "name": "customers",
   "rows": 2000,
   "description": "online shop customers in Europe",
   "columns": [
    {
     "name": "customer_id",
     "type": "bigint",
     "description": "primary key"
    },
    {
     "name": "full_name",
     "type": "varchar(120)"
    },
    {
     "name": "email",
     "type": "varchar(200)",
     "unique": true
    },
    {
     "name": "country",
     "type": "char(2)"
    },
    {
     "name": "birth_year",
     "type": "int"
    },
    {
     "name": "created_at",
     "type": "timestamp"
    },
    {
     "name": "marketing_opt_in",
     "type": "boolean"
    }
   ]
  },
  {
   "name": "products",
   "rows": 300,
   "description": "consumer electronics accessories",
   "columns": [
    {
     "name": "product_id",
     "type": "int",
     "description": "primary key"
    },
    {
     "name": "title",
     "type": "varchar(200)"
    },
    {
     "name": "category",
     "type": "varchar(50)"
    },
    {
     "name": "price_eur",
     "type": "numeric(10,2)"
    },
    {
     "name": "stock",
     "type": "int"
    }
   ]
  },
  {
   "name": "orders",
   "rows": 8000,
   "columns": [
    {
     "name": "order_id",
     "type": "bigint",
     "description": "primary key"
    },
    {
     "name": "customer_id",
     "type": "bigint",
     "references": "customers.customer_id"
    },
    {
     "name": "order_total_eur",
     "type": "numeric(10,2)"
    },
    {
     "name": "item_count",
     "type": "int"
    },
    {
     "name": "status",
     "type": "varchar(20)"
    },
    {
     "name": "coupon_code",
     "type": "varchar(20)",
     "nullable": true
    },
    {
     "name": "ordered_at",
     "type": "timestamp"
    }
   ]
  },
  {
   "name": "order_items",
   "rows": 20000,
   "columns": [
    {
     "name": "order_item_id",
     "type": "bigint",
     "description": "primary key"
    },
    {
     "name": "order_id",
     "type": "bigint",
     "references": "orders.order_id"
    },
    {
     "name": "product_id",
     "type": "int",
     "references": "products.product_id"
    },
    {
     "name": "quantity",
     "type": "int"
    },
    {
     "name": "unit_price_eur",
     "type": "numeric(10,2)"
    }
   ]
  }
 ]
}

What you get back

spec.json is the generation spec the API derived from the schema (distributions, category weights, time order, foreign-key skew). Edit it and send it back with the same seed to get a reproducible variant. quality.json reports distribution fit, foreign-key integrity, duplicates and time order for your run; see the methodology.

All values are synthetic. No personal data is used or produced; e-mail-like and name-like columns are generated, not sampled.