Serializing with Protobuf
Last updated
Last updated
The following table lists the data type mapping from Protobuf type to DeltaStream's Data Types.
Protobuf Type | DeltaStream Data Type |
---|---|
INT64, SINT64, SFIXED64, UINT64, FIXED64 | BIGINT |
BYTES | VARBINARY |
BOOL | BOOLEAN |
DOUBLE | DOUBLE |
FLOAT | FLOAT |
INT32, SINT32, SFIXED32, UINT32, FIXED32 | INTEGER |
STRING, ENUM | VARCHAR |
MAP | MAP |
MESSAGE | STRUCT |
repeated | ARRAY |
Currently, there is no support for Protobuf types ANY
and OneOf
in serialization. Columns in a or fields in a Struct are strictly typed at the creation time.
There is support for Protobuf's wrapped Message types that capture primitive values, in serialization. When deserializing, If the message instance has a valid value set, then that value will be unwrapped to its corresponding primitive type. If there is no value set in the message, that column or Struct field will be set to null. The following table lists the mapping for these types.
Protobuf Message Type | DeltaStream Data Type |
---|---|
| BOOLEAN |
| INTEGER |
| INTEGER |
| BIGINT |
| BIGINT |
| FLOAT |
| DOUBLE |
| VARCHAR |
| VARBINARY |
| TIMESTAMP, TIMESTAMP_LTZ |