Binary file exchange
Binary formats can preserve typed values and container metadata without rendering every value as display text. Use the native client's --query and stdout redirection for exports, then supply the resulting bytes as input.
Choose a representation
| Format family | Layout |
|---|---|
row_binary |
Positional fields using declared types. |
row_binary_with_names_and_types |
Field bytes plus column names and type declarations. |
| Arrow IPC | A file or stream with a schema and record batches. |
| Parquet | A columnar file with row groups and metadata. |
| Avro | An object container with a record schema. |
msg_pack |
Consecutive positional fields. |
A stored schema does not remove CoordinatorDB's requirement for an explicit destination table or the ordinary file() schema argument.
Export and import
- Query the required columns in a defined order.
- Select an output-capable binary format and redirect exact bytes to a file.
- Create the destination with compatible declarations.
- Load the file through FROM INFILE or attached INSERT FORMAT input.
- Query the destination to verify values and row counts.
Use the executable examples on the individual format pages. CoordinatorDB aggregate-state bytes are not a portable ClickHouse format; finalize them when an interchange representation is required.