Format Settings

Enabled by default.

## output\_format\_json\_map\_as\_array\_of\_tuples[​](#output_format_json_map_as_array_of_tuples "Direct link to output_format_json_map_as_array_of_tuples")

Serialize maps columns as JSON arrays of tuples.

Disabled by default.

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

Serialize named tuple columns as JSON objects.

Enabled by default.

## output\_format\_json\_pretty\_print[​](#output_format_json_pretty_print "Direct link to output_format_json_pretty_print")

This setting determines how nested structures such as Tuples, Maps, and Arrays are displayed within the `data` array when using the JSON output format.

For example, instead of output:

```
"data":
[
  {
    "tuple": {"a":1,"b":2,"c":3},
    "array": [1,2,3],
    "map": {"a":1,"b":2,"c":3}
  }
],
```

The output will be formatted as:

```
"data":
[
    {
        "tuple": {
            "a": 1,
            "b": 2,
            "c": 3
        },
        "array": [
            1,
            2,
            3
        ],
        "map": {
            "a": 1,
            "b": 2,
            "c": 3
        }
    }
],
```

Enabled by default.

## output\_format\_json\_quote\_64bit\_floats[​](#output_format_json_quote_64bit_floats "Direct link to output_format_json_quote_64bit_floats")

Controls quoting of 64-bit [floats](/docs/sql-reference/data-types/float) when they are output in JSON\* formats.

Disabled by default.

## output\_format\_json\_quote\_64bit\_integers[​](#output_format_json_quote_64bit_integers "Direct link to output_format_json_quote_64bit_integers")

Controls quoting of 64-bit or bigger [integers](/docs/sql-reference/data-types/int-uint) (like `UInt64` or `Int128`) when they are output in a [JSON](/docs/interfaces/formats/JSON) format.
Such integers are enclosed in quotes by default. This behavior is compatible with most JavaScript implementations.

Possible values:

- 0 — Integers are output without quotes.
- 1 — Integers are enclosed in quotes.

## output\_format\_json\_quote\_decimals[​](#output_format_json_quote_decimals "Direct link to output_format_json_quote_decimals")

Controls quoting of decimals in JSON output formats.

Disabled by default.

## output\_format\_json\_quote\_denormals[​](#output_format_json_quote_denormals "Direct link to output_format_json_quote_denormals")

Enables `+nan`, `-nan`, `+inf`, `-inf` outputs in [JSON](/docs/interfaces/formats/JSON) output format.

Possible values:

- 0 — Disabled.
- 1 — Enabled.

**Example**

Consider the following table `account_orders`:

```
┌─id─┬─name───┬─duration─┬─period─┬─area─┐
│  1 │ Andrew │       20 │      0 │  400 │
│  2 │ John   │       40 │      0 │    0 │
│  3 │ Bob    │       15 │      0 │ -100 │
└────┴────────┴──────────┴────────┴──────┘
```

When `output_format_json_quote_denormals = 0`, the query returns `null` values in output:

```
SELECT area/period FROM account_orders FORMAT JSON;
```

```
{
        "meta":
        [
                {
                        "name": "divide(area, period)",
                        "type": "Float64"
                }
        ],

        "data":
        [
                {
                        "divide(area, period)": null
                },
                {
                        "divide(area, period)": null
                },
                {
                        "divide(area, period)": null
                }
        ],

        "rows": 3,

        "statistics":
        {
                "elapsed": 0.003648093,
                "rows_read": 3,
                "bytes_read": 24
        }
}
```

When `output_format_json_quote_denormals = 1`, the query returns:

```
{
        "meta":
        [
                {
                        "name": "divide(area, period)",
                        "type": "Float64"
                }
        ],

        "data":
        [
                {
                        "divide(area, period)": "inf"
                },
                {
                        "divide(area, period)": "-nan"
                },
                {
                        "divide(area, period)": "-inf"
                }
        ],

        "rows": 3,

        "statistics":
        {
                "elapsed": 0.000070241,
                "rows_read": 3,
                "bytes_read": 24
        }
}
```

## output\_format\_json\_skip\_null\_value\_in\_named\_tuples[​](#output_format_json_skip_null_value_in_named_tuples "Direct link to output_format_json_skip_null_value_in_named_tuples")

Skip key value pairs with null value when serialize named tuple columns as JSON objects. It is only valid when output\_format\_json\_named\_tuples\_as\_objects is true.

## output\_format\_json\_validate\_utf8[​](#output_format_json_validate_utf8 "Direct link to output_format_json_validate_utf8")

Controls validation of UTF-8 sequences in JSON output formats, doesn't impact formats JSON/JSONCompact/JSONColumnsWithMetadata, they always validate UTF-8.

Disabled by default.

## output\_format\_markdown\_escape\_special\_characters[​](#output_format_markdown_escape_special_characters "Direct link to output_format_markdown_escape_special_characters")

When enabled, escape special characters in Markdown.

[Common Mark](https://spec.commonmark.org/0.30/#example-12) defines the following special characters that can be escaped by :

```
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
```

Possible values:

- 0 — Disable.
- 1 — Enable.

## output\_format\_msgpack\_uuid\_representation[​](#output_format_msgpack_uuid_representation "Direct link to output_format_msgpack_uuid_representation")

The way how to output UUID in MsgPack format.

## output\_format\_native\_encode\_types\_in\_binary\_format[​](#output_format_native_encode_types_in_binary_format "Direct link to output_format_native_encode_types_in_binary_format")

Write data types in binary format instead of type names in Native output format

## output\_format\_native\_use\_flattened\_dynamic\_and\_json\_serialization[​](#output_format_native_use_flattened_dynamic_and_json_serialization "Direct link to output_format_native_use_flattened_dynamic_and_json_serialization")

Write data of [JSON](/docs/sql-reference/data-types/newjson) and [Dynamic](/docs/sql-reference/data-types/dynamic) columns in a flattened format (all types/paths as separate subcolumns).

## output\_format\_native\_write\_json\_as\_string[​](#output_format_native_write_json_as_string "Direct link to output_format_native_write_json_as_string")

Write data of [JSON](/docs/sql-reference/data-types/newjson) column as [String](/docs/sql-reference/data-types/string) column containing JSON strings instead of default native JSON serialization.

## output\_format\_orc\_compression\_block\_size[​](#output_format_orc_compression_block_size "Direct link to output_format_orc_compression_block_size")

The size of the compression block in bytes for ORC output format.

## output\_format\_orc\_compression\_method[​](#output_format_orc_compression_method "Direct link to output_format_orc_compression_method")

Compression method for ORC output format. Supported codecs: lz4, snappy, zlib, zstd, none (uncompressed)

## output\_format\_orc\_dictionary\_key\_size\_threshold[​](#output_format_orc_dictionary_key_size_threshold "Direct link to output_format_orc_dictionary_key_size_threshold")

For a string column in ORC output format, if the number of distinct values is greater than this fraction of the total number of non-null rows, turn off dictionary encoding. Otherwise dictionary encoding is enabled

## output\_format\_orc\_row\_index\_stride[​](#output_format_orc_row_index_stride "Direct link to output_format_orc_row_index_stride")

Target row index stride in ORC output format

## output\_format\_orc\_string\_as\_string[​](#output_format_orc_string_as_string "Direct link to output_format_orc_string_as_string")

Use ORC String type instead of Binary for String columns

## output\_format\_orc\_writer\_time\_zone\_name[​](#output_format_orc_writer_time_zone_name "Direct link to output_format_orc_writer_time_zone_name")