# Serializing with Protobuf

The following table lists the data type mapping from Protobuf type to DeltaStream's [data-types](https://docs.deltastream.io/reference/sql-syntax/data-types "mention").

| 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                 |

{% hint style="info" %}
**Note** Currently, there is no support for Protobuf types `ANY` and `OneOf` in serialization. Columns in a [#relation](https://docs.deltastream.io/overview/core-concepts/databases#relation "mention") or fields in a [Struct](https://docs.deltastream.io/reference/data-types#constructed-data-types) are strictly typed at the creation time.
{% endhint %}

There is support for Protobuf's wrapped message types that capture primitive values, in serialization. If the message instance has a valid value set when deserializing, that value is unwrapped to its corresponding primitive type. If there is no value set in the message, that column or Struct field is set to null.

The following table lists the mapping for these types:

| Protobuf Message Type         | DeltaStream Data Type     |
| ----------------------------- | ------------------------- |
| `google.protobuf.BoolValue`   | BOOLEAN                   |
| `google.protobuf.Int32Value`  | INTEGER                   |
| `google.protobuf.UInt32Value` | INTEGER                   |
| `google.protobuf.Int64Value`  | BIGINT                    |
| `google.protobuf.UInt64Value` | BIGINT                    |
| `google.protobuf.FloatValue`  | FLOAT                     |
| `google.protobuf.DoubleValue` | DOUBLE                    |
| `google.protobuf.StringValue` | VARCHAR                   |
| `google.protobuf.BytesValue`  | VARBINARY                 |
| `google.protobuf.Timestamp`   | TIMESTAMP, TIMESTAMP\_LTZ |
