ProtobufList
ClickHouse Cloud 中不支持
| 输入 | 输出 | 别名 |
|---|---|---|
| ✔ | ✔ |
描述
ProtobufList 格式类似于 Protobuf 格式,但行表示为包含在固定名称为 "Envelope" 的消息中的子消息序列。
使用示例
例如
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'"
其中文件 schemafile.proto 看起来像这样
schemafile.proto
syntax = "proto3";
message Envelope {
message MessageType {
string name = 1;
string surname = 2;
uint32 birthDate = 3;
repeated string phoneNumbers = 4;
};
MessageType row = 1;
};