データ形式
データ形式に関しては、chDB は機能面で ClickHouse と 100% 互換性があります。
入力フォーマットは、File、URL、S3 のようなファイルをバックエンドとするテーブルに対して行う INSERT および SELECT に渡されたデータをパースするために使用されます。
出力フォーマットは、SELECT の結果を整形し、ファイルをバックエンドとするテーブルへの INSERT を実行するために使用されます。
ClickHouse がサポートするデータ形式に加えて、chDB は次の形式もサポートします:
- 出力フォーマットとしての
ArrowTable。型は Python のpyarrow.Table - 入力・出力フォーマットとしての
DataFrame。型は Python のpandas.DataFrame。例についてはtest_joindf.pyを参照してください - 出力フォーマットとしての
Debug(CSVのエイリアス)。ClickHouse からのデバッグ用詳細出力が有効化されます。
ClickHouse でサポートされているデータ形式は次のとおりです:
| フォーマット | 入力 | 出力 |
|---|---|---|
| TabSeparated | ✔ | ✔ |
| TabSeparatedRaw | ✔ | ✔ |
| TabSeparatedWithNames | ✔ | ✔ |
| TabSeparatedWithNamesAndTypes | ✔ | ✔ |
| TabSeparatedRawWithNames | ✔ | ✔ |
| TabSeparatedRawWithNamesAndTypes | ✔ | ✔ |
| テンプレート | ✔ | ✔ |
| TemplateIgnoreSpaces | ✔ | ✗ |
| CSV | ✔ | ✔ |
| CSVWithNames | ✔ | ✔ |
| CSVWithNamesAndTypes | ✔ | ✔ |
| カスタム区切り | ✔ | ✔ |
| CustomSeparatedWithNames | ✔ | ✔ |
| CustomSeparatedWithNamesAndTypes | ✔ | ✔ |
| SQLInsert | ✗ | ✔ |
| 値 | ✔ | ✔ |
| 垂直 | ✗ | ✔ |
| JSON | ✔ | ✔ |
| JSONAsString | ✔ | ✗ |
| JSONAsObject | ✔ | ✗ |
| JSONStrings | ✔ | ✔ |
| JSONColumns | ✔ | ✔ |
| JSONColumnsWithMetadata | ✔ | ✔ |
| JSONCompact | ✔ | ✔ |
| JSONCompactStrings | ✗ | ✔ |
| JSONCompactColumns | ✔ | ✔ |
| JSONEachRow | ✔ | ✔ |
| PrettyJSONEachRow | ✗ | ✔ |
| JSONEachRowWithProgress | ✗ | ✔ |
| JSONStringsEachRow | ✔ | ✔ |
| JSONStringsEachRowWithProgress | ✗ | ✔ |
| JSONCompactEachRow | ✔ | ✔ |
| JSONCompactEachRowWithNames | ✔ | ✔ |
| JSONCompactEachRowWithNamesAndTypes | ✔ | ✔ |
| JSONCompactEachRowWithProgress | ✗ | ✔ |
| JSONCompactStringsEachRow | ✔ | ✔ |
| JSONCompactStringsEachRowWithNames | ✔ | ✔ |
| JSONCompactStringsEachRowWithNamesAndTypes | ✔ | ✔ |
| JSONCompactStringsEachRowWithProgress | ✗ | ✔ |
| JSONObjectEachRow | ✔ | ✔ |
| BSONEachRow | ✔ | ✔ |
| TSKV | ✔ | ✔ |
| 整形 | ✗ | ✔ |
| PrettyNoEscapes | ✗ | ✔ |
| PrettyMonoBlock | ✗ | ✔ |
| PrettyNoEscapesMonoBlock | ✗ | ✔ |
| PrettyCompact | ✗ | ✔ |
| PrettyCompactNoEscapes | ✗ | ✔ |
| PrettyCompactMonoBlock | ✗ | ✔ |
| PrettyCompactNoEscapesMonoBlock | ✗ | ✔ |
| PrettySpace | ✗ | ✔ |
| PrettySpaceNoEscapes | ✗ | ✔ |
| PrettySpaceMonoBlock | ✗ | ✔ |
| PrettySpaceNoEscapesMonoBlock | ✗ | ✔ |
| Prometheus | ✗ | ✔ |
| Protobuf | ✔ | ✔ |
| ProtobufSingle | ✔ | ✔ |
| ProtobufList | ✔ | ✔ |
| Avro | ✔ | ✔ |
| AvroConfluent | ✔ | ✗ |
| Parquet | ✔ | ✔ |
| ParquetMetadata | ✔ | ✗ |
| Arrow | ✔ | ✔ |
| ArrowStream | ✔ | ✔ |
| ORC | ✔ | ✔ |
| 1 | ✔ | ✗ |
| Npy | ✔ | ✔ |
| RowBinary | ✔ | ✔ |
| RowBinaryWithNames | ✔ | ✔ |
| RowBinaryWithNamesAndTypes | ✔ | ✔ |
| RowBinaryWithDefaults | ✔ | ✗ |
| ネイティブ | ✔ | ✔ |
| Null | ✗ | ✔ |
| XML | ✗ | ✔ |
| CapnProto | ✔ | ✔ |
| LineAsString | ✔ | ✔ |
| 正規表現 | ✔ | ✗ |
| RawBLOB | ✔ | ✔ |
| MsgPack | ✔ | ✔ |
| MySQLDump | ✔ | ✗ |
| DWARF | ✔ | ✗ |
| Markdown | ✗ | ✔ |
| フォーム | ✔ | ✗ |
さらに詳しい情報や例については、入力および出力データ用の ClickHouse フォーマット を参照してください。