Skip to main content

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:

  • ArrowTable as output format, the type is Python pyarrow.Table
  • DataFrame as 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:

FormatInputOutput
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โœ—โœ”