Skip to content
HALOWERK

Codewerk

sql transpile

Parses the query with the node-sql-parser 5.4.0 grammar of the source dialect (DuckDB input uses the PostgreSQL grammar, from which DuckDB's parser derives) and emits the target SQL with an own, allow-listed generator instead of the library's sqlify (which leaves e.g. MySQL "LIMIT 20, 10" untouched). Handled: SELECT with WITH, DISTINCT, joins, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT/OFFSET, UNION/INTERSECT/EXCEPT, subqueries, CASE, CAST/::, window functions without frames and a fixed.

POST https://code.halowerk.com/v1/sql-transpile

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
sqlstringYesOne or more SELECT statements separated by semicolons.
fromstringYesSource dialect.
tostringYesTarget dialect.
preserve_null_orderbooleanNoAdd NULLS FIRST/LAST (or the MySQL IS NULL idiom) where the default NULL ordering differs.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sql",
    "from",
    "to"
  ],
  "properties": {
    "sql": {
      "type": "string",
      "minLength": 6,
      "maxLength": 100000,
      "description": "One or more SELECT statements separated by semicolons."
    },
    "from": {
      "type": "string",
      "enum": [
        "mysql",
        "postgres",
        "bigquery",
        "snowflake",
        "duckdb"
      ],
      "description": "Source dialect."
    },
    "to": {
      "type": "string",
      "enum": [
        "mysql",
        "postgres",
        "bigquery",
        "snowflake",
        "duckdb"
      ],
      "description": "Target dialect."
    },
    "preserve_null_order": {
      "type": "boolean",
      "default": true,
      "description": "Add NULLS FIRST/LAST (or the MySQL IS NULL idiom) where the default NULL ordering differs."
    }
  }
}

Open original schema

Published input example

{
  "from": "mysql",
  "to": "postgres",
  "sql": "SELECT id, name FROM users WHERE age > 18 ORDER BY name LIMIT 20, 10"
}

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