メインコンテンツまでスキップ
メインコンテンツまでスキップ

ProtobufList

Not supported in 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 は次のようになります:

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

形式設定