Skip to content
HALOWERK

Codewerk

seed data

Parses the DDL (CREATE TABLE, CREATE TYPE . AS ENUM; PostgreSQL or MySQL) and generates rows with a seeded PRNG (mulberry32 per table and column, so the same seed always gives the same data). Parents are filled before children, foreign keys point at generated parent rows (self references at earlier rows, cycles only through nullable keys), primary and unique keys stay distinct, simple CHECK constraints (IN lists, = ANY(ARRAY[.]), comparisons, BETWEEN, length) are honoured, generated.

POST https://code.halowerk.com/v1/seed-data

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
ddlstringYesCREATE TABLE statements (and CREATE TYPE ... AS ENUM).
rowsintegerNoRows per table.
rows_per_tableobjectNo
seedintegerNo
null_rationumberNoShare of NULLs in nullable columns.
formatstringNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "ddl"
  ],
  "properties": {
    "ddl": {
      "type": "string",
      "minLength": 10,
      "maxLength": 500000,
      "description": "CREATE TABLE statements (and CREATE TYPE ... AS ENUM)."
    },
    "rows": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000,
      "default": 10,
      "description": "Rows per table."
    },
    "rows_per_table": {
      "type": "object",
      "maxProperties": 50,
      "additionalProperties": {
        "type": "integer",
        "minimum": 0,
        "maximum": 1000
      },
      "default": {}
    },
    "seed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647,
      "default": 42
    },
    "null_ratio": {
      "type": "number",
      "minimum": 0,
      "maximum": 0.9,
      "default": 0.1,
      "description": "Share of NULLs in nullable columns."
    },
    "format": {
      "type": "string",
      "enum": [
        "both",
        "json",
        "sql"
      ],
      "default": "both"
    }
  }
}

Open original schema

Published input example

{
  "ddl": "CREATE TABLE customers (id bigint PRIMARY KEY, email text NOT NULL UNIQUE, full_name text NOT NULL);",
  "rows": 3,
  "seed": 7
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’