Format Settings

Use ANSI escape sequences in Pretty formats. 0 - disabled, 1 - enabled, 'auto' - enabled if a terminal.

## output\_format\_pretty\_display\_footer\_column\_names[​](#output_format_pretty_display_footer_column_names "Direct link to output_format_pretty_display_footer_column_names")

Display column names in the footer if there are many table rows.

Possible values:

- 0 — No column names are displayed in the footer.
- 1 — Column names are displayed in the footer if row count is greater than or equal to the threshold value set by [output\_format\_pretty\_display\_footer\_column\_names\_min\_rows](#output_format_pretty_display_footer_column_names_min_rows) (50 by default).

**Example**

Query:

```
SELECT *, toTypeName(*) FROM (SELECT * FROM system.numbers LIMIT 1000);
```

Result:

```
      ┌─number─┬─toTypeName(number)─┐
   1. │      0 │ UInt64             │
   2. │      1 │ UInt64             │
   3. │      2 │ UInt64             │
   ...
 999. │    998 │ UInt64             │
1000. │    999 │ UInt64             │
      └─number─┴─toTypeName(number)─┘
```

## output\_format\_pretty\_display\_footer\_column\_names\_min\_rows[​](#output_format_pretty_display_footer_column_names_min_rows "Direct link to output_format_pretty_display_footer_column_names_min_rows")

Sets the minimum number of rows for which a footer with column names will be displayed if setting [output\_format\_pretty\_display\_footer\_column\_names](#output_format_pretty_display_footer_column_names) is enabled.

## output\_format\_pretty\_fallback\_to\_vertical[​](#output_format_pretty_fallback_to_vertical "Direct link to output_format_pretty_fallback_to_vertical")

If enabled, and the table is wide but short, the Pretty format will output it as the Vertical format does.
See `output_format_pretty_fallback_to_vertical_max_rows_per_chunk` and `output_format_pretty_fallback_to_vertical_min_table_width` for detailed tuning of this behavior.

## output\_format\_pretty\_fallback\_to\_vertical\_max\_rows\_per\_chunk[​](#output_format_pretty_fallback_to_vertical_max_rows_per_chunk "Direct link to output_format_pretty_fallback_to_vertical_max_rows_per_chunk")

The fallback to Vertical format (see `output_format_pretty_fallback_to_vertical`) will be activated only if the number of records in a chunk is not more than the specified value.

## output\_format\_pretty\_fallback\_to\_vertical\_min\_columns[​](#output_format_pretty_fallback_to_vertical_min_columns "Direct link to output_format_pretty_fallback_to_vertical_min_columns")

The fallback to Vertical format (see `output_format_pretty_fallback_to_vertical`) will be activated only if the number of columns is greater than the specified value.

## output\_format\_pretty\_fallback\_to\_vertical\_min\_table\_width[​](#output_format_pretty_fallback_to_vertical_min_table_width "Direct link to output_format_pretty_fallback_to_vertical_min_table_width")

The fallback to Vertical format (see `output_format_pretty_fallback_to_vertical`) will be activated only if the sum of lengths of columns in a table is at least the specified value, or if at least one value contains a newline character.

## output\_format\_pretty\_glue\_chunks[​](#output_format_pretty_glue_chunks "Direct link to output_format_pretty_glue_chunks")

If the data rendered in Pretty formats arrived in multiple chunks, even after a delay, but the next chunk has the same column widths as the previous, use ANSI escape sequences to move back to the previous line and overwrite the footer of the previous chunk to continue it with the data of the new chunk. This makes the result more visually pleasant.

0 - disabled, 1 - enabled, 'auto' - enabled if a terminal.

## output\_format\_pretty\_grid\_charset[​](#output_format_pretty_grid_charset "Direct link to output_format_pretty_grid_charset")

Charset for printing grid borders. Available charsets: ASCII, UTF-8 (default).

## output\_format\_pretty\_highlight\_digit\_groups[​](#output_format_pretty_highlight_digit_groups "Direct link to output_format_pretty_highlight_digit_groups")

If enabled and if output is a terminal, highlight every digit corresponding to the number of thousands, millions, etc. with underline.

## output\_format\_pretty\_highlight\_trailing\_spaces[​](#output_format_pretty_highlight_trailing_spaces "Direct link to output_format_pretty_highlight_trailing_spaces")

If enabled and if output is a terminal, highlight trailing spaces with a gray color and underline.

## output\_format\_pretty\_max\_column\_name\_width\_cut\_to[​](#output_format_pretty_max_column_name_width_cut_to "Direct link to output_format_pretty_max_column_name_width_cut_to")

If the column name is too long, cut it to this length.
The column will be cut if it is longer than `output_format_pretty_max_column_name_width_cut_to` plus `output_format_pretty_max_column_name_width_min_chars_to_cut`.

## output\_format\_pretty\_max\_column\_name\_width\_min\_chars\_to\_cut[​](#output_format_pretty_max_column_name_width_min_chars_to_cut "Direct link to output_format_pretty_max_column_name_width_min_chars_to_cut")

Minimum characters to cut if the column name is too long.
The column will be cut if it is longer than `output_format_pretty_max_column_name_width_cut_to` plus `output_format_pretty_max_column_name_width_min_chars_to_cut`.

## output\_format\_pretty\_max\_column\_pad\_width[​](#output_format_pretty_max_column_pad_width "Direct link to output_format_pretty_max_column_pad_width")

Maximum width to pad all values in a column in Pretty formats.

## output\_format\_pretty\_max\_rows[​](#output_format_pretty_max_rows "Direct link to output_format_pretty_max_rows")

Rows limit for Pretty formats.

## output\_format\_pretty\_max\_value\_width[​](#output_format_pretty_max_value_width "Direct link to output_format_pretty_max_value_width")

Maximum width of value to display in Pretty formats. If greater - it will be cut.
The value 0 means - never cut.

## output\_format\_pretty\_max\_value\_width\_apply\_for\_single\_value[​](#output_format_pretty_max_value_width_apply_for_single_value "Direct link to output_format_pretty_max_value_width_apply_for_single_value")

Only cut values (see the `output_format_pretty_max_value_width` setting) when it is not a single value in a block. Otherwise output it entirely, which is useful for the `SHOW CREATE TABLE` query.

## output\_format\_pretty\_multiline\_fields[​](#output_format_pretty_multiline_fields "Direct link to output_format_pretty_multiline_fields")

If enabled, Pretty formats will render multi-line fields inside table cell, so the table's outline will be preserved.
If not, they will be rendered as is, potentially deforming the table (one upside of keeping it off is that copy-pasting multi-line values will be easier).

## output\_format\_pretty\_named\_tuples\_as\_json[​](#output_format_pretty_named_tuples_as_json "Direct link to output_format_pretty_named_tuples_as_json")

Controls whether named tuples in Pretty format are output as pretty-printed JSON objects.

## output\_format\_pretty\_row\_numbers[​](#output_format_pretty_row_numbers "Direct link to output_format_pretty_row_numbers")

Add row numbers before each row for pretty output format

## output\_format\_pretty\_single\_large\_number\_tip\_threshold[​](#output_format_pretty_single_large_number_tip_threshold "Direct link to output_format_pretty_single_large_number_tip_threshold")

Print a readable number tip on the right side of the table if the block consists of a single number which exceeds this value (except 0)

## output\_format\_pretty\_squash\_consecutive\_ms[​](#output_format_pretty_squash_consecutive_ms "Direct link to output_format_pretty_squash_consecutive_ms")

Wait for the next block for up to specified number of milliseconds and squash it to the previous before writing.
This avoids frequent output of too small blocks, but still allows to display data in a streaming fashion.

## output\_format\_pretty\_squash\_max\_wait\_ms[​](#output_format_pretty_squash_max_wait_ms "Direct link to output_format_pretty_squash_max_wait_ms")