Data Formats
chDB is 100% feature compatible with ClickHouse ๐
Please refer to the ClickHouse SQL Reference for further information and examples.
Just like ClickHouse, chDB can accept and return data in various formats.
Input formats are used to parse the data provided to INSERT and SELECT from a file-backed table such as File, URL or S3.
Output formats are used to arrange the results of a SELECT, and to perform INSERTs into a file-backed table.
Besides all of the data formats that ClickHouse supported, chDB also supports:
- ArrowTableas output format, the type is Python- pyarrow.Table
- DataFrameas input and output format, the type is Python- pandas.DataFrame. For examples, see test_joindf.py
- Debug as output (as an alias of CSV), but with enabled debug verbose output from ClickHouse.
The supported data formats from ClickHouse are:
| Format | Input | Output | 
|---|---|---|
| TabSeparated | โ | โ | 
| TabSeparatedRaw | โ | โ | 
| TabSeparatedWithNames | โ | โ | 
| TabSeparatedWithNamesAndTypes | โ | โ | 
| TabSeparatedRawWithNames | โ | โ | 
| TabSeparatedRawWithNamesAndTypes | โ | โ | 
| Template | โ | โ | 
| TemplateIgnoreSpaces | โ | โ | 
| CSV | โ | โ | 
| CSVWithNames | โ | โ | 
| CSVWithNamesAndTypes | โ | โ | 
| CustomSeparated | โ | โ | 
| CustomSeparatedWithNames | โ | โ | 
| CustomSeparatedWithNamesAndTypes | โ | โ | 
| SQLInsert | โ | โ | 
| Values | โ | โ | 
| Vertical | โ | โ | 
| JSON | โ | โ | 
| JSONAsString | โ | โ | 
| JSONStrings | โ | โ | 
| JSONColumns | โ | โ | 
| JSONColumnsWithMetadata | โ | โ | 
| JSONCompact | โ | โ | 
| JSONCompactStrings | โ | โ | 
| JSONCompactColumns | โ | โ | 
| JSONEachRow | โ | โ | 
| PrettyJSONEachRow | โ | โ | 
| JSONEachRowWithProgress | โ | โ | 
| JSONStringsEachRow | โ | โ | 
| JSONStringsEachRowWithProgress | โ | โ | 
| JSONCompactEachRow | โ | โ | 
| JSONCompactEachRowWithNames | โ | โ | 
| JSONCompactEachRowWithNamesAndTypes | โ | โ | 
| JSONCompactStringsEachRow | โ | โ | 
| JSONCompactStringsEachRowWithNames | โ | โ | 
| JSONCompactStringsEachRowWithNamesAndTypes | โ | โ | 
| JSONObjectEachRow | โ | โ | 
| BSONEachRow | โ | โ | 
| TSKV | โ | โ | 
| Pretty | โ | โ | 
| PrettyNoEscapes | โ | โ | 
| PrettyMonoBlock | โ | โ | 
| PrettyNoEscapesMonoBlock | โ | โ | 
| PrettyCompact | โ | โ | 
| PrettyCompactNoEscapes | โ | โ | 
| PrettyCompactMonoBlock | โ | โ | 
| PrettyCompactNoEscapesMonoBlock | โ | โ | 
| PrettySpace | โ | โ | 
| PrettySpaceNoEscapes | โ | โ | 
| PrettySpaceMonoBlock | โ | โ | 
| PrettySpaceNoEscapesMonoBlock | โ | โ | 
| Prometheus | โ | โ | 
| Protobuf | โ | โ | 
| ProtobufSingle | โ | โ | 
| Avro | โ | โ | 
| AvroConfluent | โ | โ | 
| Parquet | โ | โ | 
| ParquetMetadata | โ | โ | 
| Arrow | โ | โ | 
| ArrowStream | โ | โ | 
| ORC | โ | โ | 
| One | โ | โ | 
| RowBinary | โ | โ | 
| RowBinaryWithNames | โ | โ | 
| RowBinaryWithNamesAndTypes | โ | โ | 
| RowBinaryWithDefaults | โ | โ | 
| Native | โ | โ | 
| Null | โ | โ | 
| XML | โ | โ | 
| CapnProto | โ | โ | 
| LineAsString | โ | โ | 
| Regexp | โ | โ | 
| RawBLOB | โ | โ | 
| MsgPack | โ | โ | 
| MySQLDump | โ | โ | 
| Markdown | โ | โ |