MainSourcesClickhouse
ClickHouse Data Types
Data Types Mapping
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
Int8 | Int8 | |
Int16 | Int16 | |
Int32 | Int32 | |
Int64 | Int64 | |
Int128 | FixedSizeBinary(16) | Recreated as Int128 on a ClickHouse target. |
Int256 | FixedSizeBinary(32) | Recreated as Int256 on a ClickHouse target. |
UInt8 | UInt8 | |
UInt16 | UInt16 | |
UInt32 | UInt32 | |
UInt64 | UInt64 | |
UInt128 | FixedSizeBinary(16) | Recreated as UInt128 on a ClickHouse target. |
UInt256 | FixedSizeBinary(32) | Recreated as UInt256 on a ClickHouse target. |
Float32 | Float32 | |
Float64 | Float64 | |
Decimal(p, s) where p ≤ 38 | Decimal128(p, s) | Precision and scale are preserved. |
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
Bool, Boolean | Boolean |
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
Date | UInt16 / Date32 | Transport type depends on the ClickHouse version. Recreated as Date on a ClickHouse target. |
Date32 | Date32 | |
DateTime([tz]) | UInt32 / Timestamp(ms, [tz]) | Transport type depends on the ClickHouse version. Recreated with its timezone on a ClickHouse target. |
DateTime64(p, [tz]) where p ≤ 3 | Timestamp(ms, [tz]) | The original precision and timezone are preserved for ClickHouse targets. |
DateTime64(p, [tz]) where 4 ≤ p ≤ 6 | Timestamp(µs, [tz]) | The original precision and timezone are preserved for ClickHouse targets. |
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
String | Utf8 | |
FixedString(n) | FixedSizeBinary(n) | Recreated with the same length on a ClickHouse target. |
Enum8, Enum16 | Int8, Int16 / Utf8 | Transport type depends on the ClickHouse version. Labels and numeric values are preserved for ClickHouse targets. |
LowCardinality(T) | Mapping for T | Recreated with LowCardinality on a ClickHouse target. Nullability is inherited recursively from T. |
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
IPv4 | UInt32 | Recreated as IPv4 on a ClickHouse target. |
IPv6 | FixedSizeBinary(16) | Recreated as IPv6 on a ClickHouse target. |
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
Nullable(T) | Nullable mapping for T | Supported when T is supported. |
Array(T) | List<T> | Supported when T is supported. |
Tuple(...) | Struct | Supported when every field is supported. |
Map(K, V) | Map<K, V> | Supported when both types are supported. |
SimpleAggregateFunction(F, T) | Mapping for T | Supported when T is supported. Nullability is inherited recursively from T. |
| ClickHouse Type(s) | Apache Arrow DataType | Notes |
|---|---|---|
Decimal(p, s) where p > 38 | Unsupported | |
DateTime64(p, [tz]) where p > 6 | Unsupported | |
UUID, JSON | Unsupported | |
Nested | Unsupported | |
Point, Ring, Polygon, MultiPolygon | Unsupported |
Remove unsupported columns from the table selection before starting the connector.
ClickHouse to ClickHouse replication
When both the source and target are ClickHouse, Supermetal recreates supported columns with their original ClickHouse types. This includes recursive nullability, LowCardinality, SimpleAggregateFunction, enum definitions, decimal precision, and temporal precision.
Last updated on