MainSourcesClickhouse

ClickHouse Data Types

Data Types Mapping

ClickHouse Type(s)Apache Arrow DataTypeNotes
Int8Int8
Int16Int16
Int32Int32
Int64Int64
Int128FixedSizeBinary(16)Recreated as Int128 on a ClickHouse target.
Int256FixedSizeBinary(32)Recreated as Int256 on a ClickHouse target.
UInt8UInt8
UInt16UInt16
UInt32UInt32
UInt64UInt64
UInt128FixedSizeBinary(16)Recreated as UInt128 on a ClickHouse target.
UInt256FixedSizeBinary(32)Recreated as UInt256 on a ClickHouse target.
Float32Float32
Float64Float64
Decimal(p, s) where p ≤ 38Decimal128(p, s)Precision and scale are preserved.
ClickHouse Type(s)Apache Arrow DataTypeNotes
Bool, BooleanBoolean
ClickHouse Type(s)Apache Arrow DataTypeNotes
DateUInt16 / Date32Transport type depends on the ClickHouse version. Recreated as Date on a ClickHouse target.
Date32Date32
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 ≤ 3Timestamp(ms, [tz])The original precision and timezone are preserved for ClickHouse targets.
DateTime64(p, [tz]) where 4 ≤ p ≤ 6Timestamp(µs, [tz])The original precision and timezone are preserved for ClickHouse targets.
ClickHouse Type(s)Apache Arrow DataTypeNotes
StringUtf8
FixedString(n)FixedSizeBinary(n)Recreated with the same length on a ClickHouse target.
Enum8, Enum16Int8, Int16 / Utf8Transport type depends on the ClickHouse version. Labels and numeric values are preserved for ClickHouse targets.
LowCardinality(T)Mapping for TRecreated with LowCardinality on a ClickHouse target. Nullability is inherited recursively from T.
ClickHouse Type(s)Apache Arrow DataTypeNotes
IPv4UInt32Recreated as IPv4 on a ClickHouse target.
IPv6FixedSizeBinary(16)Recreated as IPv6 on a ClickHouse target.
ClickHouse Type(s)Apache Arrow DataTypeNotes
Nullable(T)Nullable mapping for TSupported when T is supported.
Array(T)List<T>Supported when T is supported.
Tuple(...)StructSupported when every field is supported.
Map(K, V)Map<K, V>Supported when both types are supported.
SimpleAggregateFunction(F, T)Mapping for TSupported when T is supported. Nullability is inherited recursively from T.
ClickHouse Type(s)Apache Arrow DataTypeNotes
Decimal(p, s) where p > 38Unsupported
DateTime64(p, [tz]) where p > 6Unsupported
UUID, JSONUnsupported
NestedUnsupported
Point, Ring, Polygon, MultiPolygonUnsupported

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

On this page