{
  "$schema": "/products/haybarn/functions/api/v1/function.schema.json",
  "schemaVersion": 1,
  "name": "sniff_csv",
  "schema": "main",
  "slug": "sniff_csv",
  "description": null,
  "category": "files",
  "kinds": [
    "table"
  ],
  "aliasOf": [],
  "snapshot": {
    "schemaVersion": 1,
    "id": "duckdb-1.5.6",
    "engine": "duckdb",
    "label": "DuckDB 1.5.6",
    "engineVersion": "v1.5.6",
    "sourceId": "069cc9f9b5",
    "source": "https://github.com/duckdb/duckdb/releases/tag/v1.5.6",
    "binarySha256": "2c75d4758c9d74cb0f4642f4e8d3c1a13e8a888a1e475fffd90934ad5ae3dd17",
    "capturedAt": "2026-10-15T15:04:49.978Z",
    "requestedExtensions": [
      "core_functions",
      "icu",
      "json",
      "parquet"
    ],
    "loadedExtensions": [
      {
        "extension_name": "autocomplete",
        "extension_version": "v1.5.6",
        "installed_from": ""
      },
      {
        "extension_name": "core_functions",
        "extension_version": "v1.5.6",
        "installed_from": "core"
      },
      {
        "extension_name": "icu",
        "extension_version": "v1.5.6",
        "installed_from": "core"
      },
      {
        "extension_name": "json",
        "extension_version": "v1.5.6",
        "installed_from": "core"
      },
      {
        "extension_name": "parquet",
        "extension_version": "v1.5.6",
        "installed_from": "core"
      },
      {
        "extension_name": "shell",
        "extension_version": "v1.5.6",
        "installed_from": ""
      }
    ],
    "scope": "Built-in functions in the main schema, with the requested extensions loaded. Catalog visibility is not a guarantee of browser support."
  },
  "links": {
    "html": "/products/haybarn/functions/releases/duckdb-1.5.6/sniff_csv/",
    "markdown": "/products/haybarn/functions/releases/duckdb-1.5.6/sniff_csv/index.md",
    "json": "/products/haybarn/functions/api/v1/duckdb-1.5.6/functions/sniff_csv.json"
  },
  "interpretation": [
    "Choose a snapshot matching the target engine and build. The default is captured from the published Haybarn WASM package used by the browser playground. Historical native snapshots are also available.",
    "Availability is an observation in the recorded build and extension profile, not a guarantee of support in every installation or in WASM.",
    "Types and descriptions are declarations from duckdb_functions(). Binding can specialize result types. Null means not supplied by the catalog; do not invent defaults, optionality, argument mode, or table output columns.",
    "Raw parameter arrays preserve catalog order for scalar/aggregate/macro functions. Raw table arguments are alphabetical. Use callingConvention for engine-confirmed positional order and named arguments; null modes are unrecorded. Named does not mean optional. Macro defaults and special named variadic behavior are not supplied by duckdb_functions().",
    "Catalog examples are source material and may require data or extensions. runnableExamples contains separately verified SQL for the pinned WASM package; sample-data adaptations and guide examples are labeled separately.",
    "Guide annotations and recipes are separate editorial content. The browser runner always uses Haybarn WASM 1.5.6-rc6, independently of the documentation snapshot.",
    "All URLs beginning with / are relative to the origin hosting this document. Exports require no JavaScript, cookies, API key, or browser engine."
  ],
  "overloads": [
    {
      "id": "overload-8f7d448e5ceccbca",
      "url": "/products/haybarn/functions/releases/duckdb-1.5.6/sniff_csv/#overload-8f7d448e5ceccbca",
      "signature": "sniff_csv(col0: VARCHAR, all_varchar := BOOLEAN, allow_quoted_nulls := BOOLEAN, auto_detect := BOOLEAN, auto_type_candidates := ANY, buffer_size := UBIGINT, column_names := VARCHAR[], column_types := ANY, columns := ANY, comment := VARCHAR, compression := VARCHAR, dateformat := VARCHAR, decimal_separator := VARCHAR, delim := VARCHAR, dtypes := ANY, encoding := VARCHAR, escape := VARCHAR, filename := ANY, files_to_sniff := BIGINT, force_match := BOOLEAN, force_not_null := VARCHAR[], header := BOOLEAN, hive_partitioning := BOOLEAN, hive_types := ANY, hive_types_autocast := BOOLEAN, ignore_errors := BOOLEAN, max_line_size := VARCHAR, maximum_line_size := VARCHAR, names := VARCHAR[], new_line := VARCHAR, normalize_names := BOOLEAN, null_padding := BOOLEAN, nullstr := ANY, parallel := BOOLEAN, quote := VARCHAR, rejects_limit := BIGINT, rejects_scan := VARCHAR, rejects_table := VARCHAR, sample_size := BIGINT, sep := VARCHAR, skip := BIGINT, store_rejects := BOOLEAN, strict_mode := BOOLEAN, thousands := VARCHAR, timestampformat := VARCHAR, types := ANY, union_by_name := BOOLEAN) → TABLE",
      "parameterOrder": "alphabetical-not-call-order",
      "callingConvention": {
        "source": "engine-binder",
        "parameters": [
          {
            "name": "all_varchar",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "allow_quoted_nulls",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "auto_detect",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "auto_type_candidates",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "buffer_size",
            "type": "UBIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "col0",
            "type": "VARCHAR",
            "mode": "positional",
            "position": 0
          },
          {
            "name": "column_names",
            "type": "VARCHAR[]",
            "mode": "named",
            "position": null
          },
          {
            "name": "column_types",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "columns",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "comment",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "compression",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "dateformat",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "decimal_separator",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "delim",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "dtypes",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "encoding",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "escape",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "filename",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "files_to_sniff",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "force_match",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "force_not_null",
            "type": "VARCHAR[]",
            "mode": "named",
            "position": null
          },
          {
            "name": "header",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "hive_partitioning",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "hive_types",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "hive_types_autocast",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "ignore_errors",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "max_line_size",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "maximum_line_size",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "names",
            "type": "VARCHAR[]",
            "mode": "named",
            "position": null
          },
          {
            "name": "new_line",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "normalize_names",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "null_padding",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "nullstr",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "parallel",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "quote",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "rejects_limit",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "rejects_scan",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "rejects_table",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "sample_size",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "sep",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "skip",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "store_rejects",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "strict_mode",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "thousands",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "timestampformat",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "types",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "union_by_name",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          }
        ],
        "positional": [
          {
            "name": "col0",
            "type": "VARCHAR",
            "mode": "positional",
            "position": 0
          }
        ],
        "named": [
          {
            "name": "all_varchar",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "allow_quoted_nulls",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "auto_detect",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "auto_type_candidates",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "buffer_size",
            "type": "UBIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "column_names",
            "type": "VARCHAR[]",
            "mode": "named",
            "position": null
          },
          {
            "name": "column_types",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "columns",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "comment",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "compression",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "dateformat",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "decimal_separator",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "delim",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "dtypes",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "encoding",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "escape",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "filename",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "files_to_sniff",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "force_match",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "force_not_null",
            "type": "VARCHAR[]",
            "mode": "named",
            "position": null
          },
          {
            "name": "header",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "hive_partitioning",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "hive_types",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "hive_types_autocast",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "ignore_errors",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "max_line_size",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "maximum_line_size",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "names",
            "type": "VARCHAR[]",
            "mode": "named",
            "position": null
          },
          {
            "name": "new_line",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "normalize_names",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "null_padding",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "nullstr",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "parallel",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "quote",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "rejects_limit",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "rejects_scan",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "rejects_table",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "sample_size",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "sep",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "skip",
            "type": "BIGINT",
            "mode": "named",
            "position": null
          },
          {
            "name": "store_rejects",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "strict_mode",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          },
          {
            "name": "thousands",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "timestampformat",
            "type": "VARCHAR",
            "mode": "named",
            "position": null
          },
          {
            "name": "types",
            "type": "ANY",
            "mode": "named",
            "position": null
          },
          {
            "name": "union_by_name",
            "type": "BOOLEAN",
            "mode": "named",
            "position": null
          }
        ],
        "variadic": null,
        "evidence": {
          "query": "EXPLAIN SELECT * FROM \"sniff_csv\"(NULL::VARCHAR, __guide_invalid_named_parameter__ := NULL);",
          "diagnostic": "Binder Error: Invalid named parameter \"__guide_invalid_named_parameter__\" for function sniff_csv\nCandidates:\n    all_varchar BOOLEAN\n    allow_quoted_nulls BOOLEAN\n    auto_detect BOOLEAN\n    auto_type_candidates ANY\n    buffer_size UBIGINT\n    column_names VARCHAR[]\n    column_types ANY\n    columns ANY\n    comment VARCHAR\n    compression VARCHAR\n    dateformat VARCHAR\n    decimal_separator VARCHAR\n    delim VARCHAR\n    dtypes ANY\n    encoding VARCHAR\n    escape VARCHAR\n    filename ANY\n    files_to_sniff BIGINT\n    force_match BOOLEAN\n    force_not_null VARCHAR[]\n    header BOOLEAN\n    hive_partitioning BOOLEAN\n    hive_types ANY\n    hive_types_autocast BOOLEAN\n    ignore_errors BOOLEAN\n    max_line_size VARCHAR\n    maximum_line_size VARCHAR\n    names VARCHAR[]\n    new_line VARCHAR\n    normalize_names BOOLEAN\n    null_padding BOOLEAN\n    nullstr ANY\n    parallel BOOLEAN\n    quote VARCHAR\n    rejects_limit BIGINT\n    rejects_scan VARCHAR\n    rejects_table VARCHAR\n    sample_size BIGINT\n    sep VARCHAR\n    skip BIGINT\n    store_rejects BOOLEAN\n    strict_mode BOOLEAN\n    thousands VARCHAR\n    timestampformat VARCHAR\n    types ANY\n    union_by_name BOOLEAN"
        }
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "sniff_csv",
        "function_type": "table",
        "description": null,
        "comment": null,
        "return_type": null,
        "parameters": [
          "all_varchar",
          "allow_quoted_nulls",
          "auto_detect",
          "auto_type_candidates",
          "buffer_size",
          "col0",
          "column_names",
          "column_types",
          "columns",
          "comment",
          "compression",
          "dateformat",
          "decimal_separator",
          "delim",
          "dtypes",
          "encoding",
          "escape",
          "filename",
          "files_to_sniff",
          "force_match",
          "force_not_null",
          "header",
          "hive_partitioning",
          "hive_types",
          "hive_types_autocast",
          "ignore_errors",
          "max_line_size",
          "maximum_line_size",
          "names",
          "new_line",
          "normalize_names",
          "null_padding",
          "nullstr",
          "parallel",
          "quote",
          "rejects_limit",
          "rejects_scan",
          "rejects_table",
          "sample_size",
          "sep",
          "skip",
          "store_rejects",
          "strict_mode",
          "thousands",
          "timestampformat",
          "types",
          "union_by_name"
        ],
        "parameter_types": [
          "BOOLEAN",
          "BOOLEAN",
          "BOOLEAN",
          "ANY",
          "UBIGINT",
          "VARCHAR",
          "VARCHAR[]",
          "ANY",
          "ANY",
          "VARCHAR",
          "VARCHAR",
          "VARCHAR",
          "VARCHAR",
          "VARCHAR",
          "ANY",
          "VARCHAR",
          "VARCHAR",
          "ANY",
          "BIGINT",
          "BOOLEAN",
          "VARCHAR[]",
          "BOOLEAN",
          "BOOLEAN",
          "ANY",
          "BOOLEAN",
          "BOOLEAN",
          "VARCHAR",
          "VARCHAR",
          "VARCHAR[]",
          "VARCHAR",
          "BOOLEAN",
          "BOOLEAN",
          "ANY",
          "BOOLEAN",
          "VARCHAR",
          "BIGINT",
          "VARCHAR",
          "VARCHAR",
          "BIGINT",
          "VARCHAR",
          "BIGINT",
          "BOOLEAN",
          "BOOLEAN",
          "VARCHAR",
          "VARCHAR",
          "ANY",
          "BOOLEAN"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": null,
        "internal": true,
        "examples": [],
        "stability": null,
        "categories": [],
        "alias_of": null
      }
    }
  ],
  "editorial": {
    "argumentNotes": [],
    "recipes": []
  },
  "examples": [],
  "translations": [],
  "runnableExamples": [],
  "additionalDocumentation": [
    {
      "title": "CSV Import",
      "url": "https://duckdb.org/docs/current/data/csv/overview"
    },
    {
      "title": "CSV Auto Detection",
      "url": "https://duckdb.org/docs/current/data/csv/auto_detection#sniff_csv-function"
    }
  ],
  "availability": [
    {
      "snapshot": "haybarn-1.5.6-rc6",
      "observed": true,
      "overloadCount": 1,
      "matchingOverloadIds": [
        "overload-8f7d448e5ceccbca"
      ],
      "json": "/products/haybarn/functions/api/v1/haybarn-1.5.6-rc6/functions/sniff_csv.json"
    },
    {
      "snapshot": "haybarn-1.5.5-rc3",
      "observed": true,
      "overloadCount": 1,
      "matchingOverloadIds": [
        "overload-8f7d448e5ceccbca"
      ],
      "json": "/products/haybarn/functions/api/v1/haybarn-1.5.5-rc3/functions/sniff_csv.json"
    },
    {
      "snapshot": "duckdb-1.5.6",
      "observed": true,
      "overloadCount": 1,
      "matchingOverloadIds": [
        "overload-8f7d448e5ceccbca"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.5.6/functions/sniff_csv.json"
    },
    {
      "snapshot": "duckdb-1.5.5",
      "observed": true,
      "overloadCount": 1,
      "matchingOverloadIds": [
        "overload-8f7d448e5ceccbca"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.5.5/functions/sniff_csv.json"
    },
    {
      "snapshot": "duckdb-1.4.4",
      "observed": true,
      "overloadCount": 1,
      "matchingOverloadIds": [
        "overload-8f7d448e5ceccbca"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.4.4/functions/sniff_csv.json"
    },
    {
      "snapshot": "duckdb-1.3.2",
      "observed": true,
      "overloadCount": 1,
      "matchingOverloadIds": [
        "overload-8f7d448e5ceccbca"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.3.2/functions/sniff_csv.json"
    }
  ]
}
