Skip to content
HALOWERK

Codewerk

sql on csv

Loads the supplied CSV texts (auto-detected types, optional delimiter and header flag) into an in-memory DuckDB, then disables all file, network and extension access and locks the configuration before running exactly one statement. Limits: 5 MB CSV per table, 4.5 s execution, 512 MB memory, one thread, at most 1000 returned rows. Nothing is stored after the call.

POST https://code.halowerk.com/v1/sql-on-csv

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
tablesarrayYes
querystringYes
max_rowsintegerNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "tables",
    "query"
  ],
  "properties": {
    "tables": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "csv"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,62}$"
          },
          "csv": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000000
          },
          "delimiter": {
            "type": "string",
            "enum": [
              ",",
              ";",
              "\t",
              "|"
            ]
          },
          "header": {
            "type": "boolean",
            "default": true
          }
        }
      }
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000
    },
    "max_rows": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "default": 200
    }
  }
}

Open original schema

Published input example

{
  "tables": [
    {
      "name": "orders",
      "csv": "id,amount,country\n1,19.90,DE\n2,5.00,AT\n3,42.10,DE"
    }
  ],
  "query": "SELECT country, sum(amount) AS total FROM orders GROUP BY country ORDER BY total DESC"
}

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 โ†’