Skip to content

docs: missing CSV file format options QUOTE_STYLE, TRIM_SPACE, ENCODING, and ENCODING_ERROR_MODE #3304

@sundy-li

Description

@sundy-li

Missing Feature Documentation

Four CSV file format options are implemented in Databend source but are not documented in the File Format Options reference page.

Missing Options

QUOTE_STYLE (Unload only)

  • Controls whether CSV output quotes every field or only fields that require quoting.
  • Values: QUOTE_NOT_NULL (default) — quotes every non-NULL field; QUOTE_MINIMAL — quotes only when required by the CSV format.

TRIM_SPACE (Load only)

  • When true, trims leading and trailing whitespace from field values during load.
  • Default: false

ENCODING

  • Character encoding for reading/writing CSV/TSV files. Supports non-UTF-8 encodings such as GBK, latin1, etc.
  • Default: utf8

ENCODING_ERROR_MODE

  • Controls behavior when a character encoding error is encountered during load.
  • Default: error

Source References

  • src/meta/app/src/principal/file_format.rsCsvFileFormatParams struct, CsvQuoteStyle enum, OPT_QUOTE_STYLE, OPT_TRIM_SPACE, OPT_ENCODING, OPT_ENCODING_ERROR_MODE constants
  • Introduced in: #19246

What's Missing

  • No entries for these four options in docs/en/sql-reference/00-sql-reference/50-file-format-options.md under the CSV Options section

Suggested Location

  • Add to the CSV Options section of docs/en/sql-reference/00-sql-reference/50-file-format-options.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-fixIssue can be automatically fixeddocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions