OS Manuals

/usr/bin/clickhouse-format

ClickHouse is the fastest and most resource efficient open-source database for real-time apps and analytics.

From clickhouse-fips-25.12 25.12.12.1-r4 (enterprise-packages), captured 2026-11-08 by running clickhouse-format --help (exit 1). permalink

Usage: /usr/bin/clickhouse-format [options] < query
Allowed options:
  --query arg       query to format
  -h [ --help ]     produce help message
  --comments        keep comments in the output
  --hilite          add syntax highlight with ANSI terminal
                    escape sequences (can also use
                    --highlight)
  --oneline         format in single line
  --max_line_length arg (=0)
                    format in single line queries with
                    length less than specified
  -q [ --quiet ]    just check syntax, no output on success
  -n [ --multiquery ]
                    allow multiple queries in the same file
  --obfuscate       obfuscate instead of formatting
  --backslash       add a backslash at the end of each line
                    of the formatted query
  --allow_settings_after_format_in_insert
                    allow SETTINGS after FORMAT, but note,
                    that this is not always safe
  --seed arg        seed (arbitrary string) that determines
                    the result of obfuscation
  --show_secrets    show secret values like passwords, API
                    keys, etc.
  --semicolons_inline
                    In multiquery mode put semicolon on
                    last line of query instead of a new
                    line
  --max_parser_depth arg

                    Limits maximum recursion depth in the
                    recursive descent parser. Allows
                    controlling the stack size.

                    Possible values:

                    - Positive integer.
                    - 0 — Recursion depth is unlimited.

  --max_query_size arg

                    The maximum number of bytes of a query
                    string parsed by the SQL parser.
                    Data in the VALUES clause of INSERT
                    queries is processed by a separate
                    stream parser (that consumes O(1) RAM)
                    and not affected by this restriction.

                    :::note
                    `max_query_size` cannot be set within
                    an SQL query (e.g., `SELECT now()
                    SETTINGS max_query_size=10000`) because
                    ClickHouse needs to allocate a buffer
                    to parse the query, and this buffer
                    size is determined by the
                    `max_query_size` setting, which must be
                    configured before the query is
                    executed.
                    :::
Options (14)
OptionDescriptionSource
--query argquery to formathelp
-hproduce help messagehelp
--commentskeep comments in the outputhelp
--hiliteadd syntax highlight with ANSI terminal escape sequences (can also usehelp
--onelineformat in single linehelp
-qjust check syntax, no output on successhelp
--obfuscateobfuscate instead of formattinghelp
--backslashadd a backslash at the end of each line of the formatted queryhelp
--allow_settings_after_format_in_insertallow SETTINGS after FORMAT, but note, that this is not always safehelp
--seed argseed (arbitrary string) that determines the result of obfuscationhelp
--show_secretsshow secret values like passwords, API keys, etc.help
--semicolons_inlineIn multiquery mode put semicolon on last line of query instead of a new linehelp
--max_parser_depth arghelp
--max_query_size arghelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.