Skip to main content
Skip to main content

ProtobufList

Not supported in ClickHouse Cloud
InputOutputAlias

Description

The ProtobufList format is similar to the Protobuf format but rows are represented as a sequence of sub-messages contained in a message with a fixed name of "Envelope".

Example Usage

For example:

SELECT * FROM test.table FORMAT ProtobufList SETTINGS format_schema = 'schemafile:MessageType'
cat protobuflist_messages.bin | clickhouse-client --query "INSERT INTO test.table FORMAT ProtobufList SETTINGS format_schema='schemafile:MessageType'"

Where the file schemafile.proto looks like this:

schemafile.proto
syntax = "proto3";
message Envelope {
message MessageType {
string name = 1;
string surname = 2;
uint32 birthDate = 3;
repeated string phoneNumbers = 4;
};
MessageType row = 1;
};

Format Settings