{
  "slug": "sql-dump-to-csv",
  "name": "gizza-ai/sql-dump-to-csv",
  "version": "0.1.0",
  "title": "SQL Dump to CSV — Extract INSERT Rows | gizza.ai",
  "description": "Paste a SQL dump and pull the rows out of its INSERT statements into CSV — one CSV per table, with delimiter, header, NULL and quoting options. Free, private, no upload.",
  "tags": [
    "sql to csv",
    "sql dump to csv",
    "insert to csv",
    "mysql dump to csv",
    "sql export csv",
    "convert sql to csv",
    "sql insert extract",
    "database dump csv"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/sql-dump-to-csv/",
    "markdown": "https://gizza.ai/tools/sql-dump-to-csv/index.md",
    "descriptor": "https://gizza.ai/tools/sql-dump-to-csv/tool.json",
    "deep_link_example": "https://gizza.ai/tools/sql-dump-to-csv/?sql=INSERT%20INTO%20users%20%28id%2C%20name%29%20VALUES%20%281%2C%20%27Alice%27%29%2C%20%282%2C%20%27Bob%27%29%3B&table=users&delimiter=comma&header=true&null_value=%5CN&quote=minimal&bom=true"
  },
  "cli": "gizza tool sql-dump-to-csv \"INSERT INTO users (id, name) VALUES (1, 'Alice'), (2, 'Bob');\"",
  "tool": {
    "description": "Extract the row data from the INSERT statements in a SQL dump and return it as RFC-4180 CSV, one CSV section per table. Column names come from the INSERT column list when present, else from a matching CREATE TABLE, else generated col1..colN. Handles multi-row INSERTs, doubled '' and MySQL backslash string escapes, backtick/double-quote/[bracket] identifiers, and -- / # / /* */ comments. Options: table (export just one table), delimiter (comma/tab/semicolon/pipe), header (column-name row on/off), null_value (text for SQL NULL), quote (minimal/all), bom (UTF-8 BOM for Excel).",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "bom": {
          "default": false,
          "description": "Prepend a UTF-8 byte-order mark so Excel opens the CSV as UTF-8. Default false.",
          "type": "boolean"
        },
        "delimiter": {
          "default": "comma",
          "description": "Field separator for the output. One of: comma (CSV), tab (TSV), semicolon, or pipe. Default comma.",
          "enum": [
            "comma",
            "tab",
            "semicolon",
            "pipe"
          ],
          "type": "string"
        },
        "header": {
          "default": true,
          "description": "Include a first row of column names (from the INSERT column list, else CREATE TABLE, else col1..colN). Default true.",
          "type": "boolean"
        },
        "null_value": {
          "description": "Text to write for a SQL NULL cell. Default is an empty field; set to e.g. NULL or \\N to make nulls explicit.",
          "type": "string"
        },
        "quote": {
          "default": "minimal",
          "description": "Quoting policy. 'minimal' (default) wraps a field in double quotes only when it contains the delimiter, a quote, or a newline; 'all' wraps every field.",
          "enum": [
            "minimal",
            "all"
          ],
          "type": "string"
        },
        "sql": {
          "description": "The SQL dump text. INSERT statements provide the rows; CREATE TABLE (if present) supplies column names. Comments (-- , #, /* */) and other statements are ignored.",
          "type": "string"
        },
        "table": {
          "description": "Export only this table (case-insensitive, unquoted name). Blank exports every table found, each in its own '### TABLE: name' section.",
          "type": "string"
        }
      },
      "required": [
        "sql"
      ],
      "type": "object"
    }
  }
}