数据格式
在数据格式方面,chDB 与 ClickHouse 100% 功能兼容。
输入格式用于解析提供给 INSERT
和 SELECT
的数据,这些数据来自基于文件的表,例如 File
、URL
或 S3
。输出格式用于排列 SELECT
的结果,以及执行 INSERT
到基于文件的表中。除了 ClickHouse 支持的数据格式之外,chDB 还支持
ArrowTable
作为输出格式,类型为 Pythonpyarrow.Table
DataFrame
作为输入和输出格式,类型为 Pythonpandas.DataFrame
。有关示例,请参见 test_joindf.pyDebug
作为输出(作为CSV
的别名),但启用了 ClickHouse 的调试详细输出。
ClickHouse 支持的数据格式为
格式 | 输入 | 输出 |
---|---|---|
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 | ✗ | ✔ |
有关更多信息和示例,请参见 ClickHouse 用于输入和输出数据的格式.