# Serializing with Protobuf

The following table lists the data type mapping from Protobuf type to DeltaStream's [Data Types](/reference/sql-syntax/data-types.md).

| 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 [Database](/overview/core-concepts/databases.md#relation) or fields in a [Struct](/reference/sql-syntax/data-types.md#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 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deltastream.io/reference/sql-syntax/data-format-serialization/serializing-with-protobuf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
