Formats
The formats of the ClickHouse HTTP interface.
ClickHouse HTTP formats
Name the format in a FORMAT clause. The match ignores letter case. Input means INSERT ... FORMAT reads it.
| Name | Input | Output | Description |
|---|---|---|---|
TabSeparated | yes | yes | Rows as lines of tab-separated values, with special characters escaped. |
TSV | yes | yes | Short name for TabSeparated. |
TabSeparatedWithNames | yes | yes | Like TabSeparated, with a first line of column names. |
TSVWithNames | yes | yes | Short name for TabSeparatedWithNames. |
TabSeparatedWithNamesAndTypes | no | yes | Like TabSeparated, with a first line of column names and a second line of column types. |
TSVWithNamesAndTypes | no | yes | Short name for TabSeparatedWithNamesAndTypes. |
TabSeparatedRaw | no | yes | Like TabSeparated, with values written without escaping. |
TSVRaw | no | yes | Short name for TabSeparatedRaw. |
CSV | yes | yes | Rows as lines of comma-separated values, with strings in double quotes. |
CSVWithNames | yes | yes | Like CSV, with a first line of column names. |
JSONEachRow | yes | yes | One JSON object per line, with the column names as keys. |
JSON | no | yes | One JSON document with the column metadata, the rows and the row count. |
JSONCompact | no | yes | Like JSON, with each row as an array of values instead of an object. |
JSONCompactEachRow | no | yes | One JSON array of values per line. |
Native | yes | yes | ClickHouse binary format in column blocks. |
RowBinary | yes | yes | ClickHouse binary format with the values of each row one after the other. |
RowBinaryWithNamesAndTypes | yes | yes | Like RowBinary, with a header of column names and types. |