Skip to main content
Edit this page

Server packets

valuenamedescription
0HelloServer handshake response
1DataSame as client data
2ExceptionQuery processing exception
3ProgressQuery progress
4PongPing response
5EndOfStreamAll packets were transferred
6ProfileInfoProfiling data
7TotalsTotal values
8ExtremesExtreme values (min, max)
9TablesStatusResponseResponse to TableStatus request
10LogQuery system log
11TableColumnsColumns description
12UUIDsList of unique parts ids
13ReadTaskRequestString (UUID) describes a request for which next task is needed
14ProfileEventsPacket with profile events from server

The Data, Totals and Extremes can be compressed.

Hello

Response to client hello.

fieldtypevaluedescription
nameStringClickhouseServer name
version_majorUVarInt21Server major version
version_minorUVarInt12Server minor version
revisionUVarInt54452Server revision
tzStringEurope/MoscowServer timezone
display_nameStringClickhouseServer name for UI
version_patchUVarInt3Server patch version

Exception

Server exception during query processing.

fieldtypevaluedescription
codeInt3260See ErrorCodes.cpp.
nameStringDB::ExceptionServer major version
messageStringDB::Exception: Table X doesn't existServer minor version
stack_traceString~C++ stack trace
nestedBooltrueMore errors

Can be continuous list of exceptions until nested is false.

Progress

Progress of query execution periodically reported by server.

Tip

Progress reported in deltas. For totals, accumulate it on client.

fieldtypevaluedescription
rowsUVarInt65535Row count
bytesUVarInt871799Byte count
total_rowsUVarInt0Total rows
wrote_rowsUVarInt0Rows from client
wrote_bytesUVarInt0Bytes from client

Pong

Response for client ping, no packet body.

End of stream

No more Data packets will be sent, query result is fully steamed from server to client.

No packet body.

Profile info

fieldtype
rowsUVarInt
blocksUVarInt
bytesUVarInt
applied_limitBool
rows_before_limitUVarInt
calculated_rows_before_limitBool

Log

Data block with server log.

Tip

Encoded as data block of columns, but is never compressed.

columntype
timeDateTime
time_microUInt32
host_nameString
query_idString
thread_idUInt64
priorityInt8
sourceString
textString

Profile events

Data block with profile events.

Tip

Encoded as data block of columns, but is never compressed.

The value type is UInt64 or Int64, depending on server revision.

columntype
host_nameString
current_timeDateTime
thread_idUInt64
typeInt8
nameString
valueUInt64 or Int64