# Data type conversions between Langstack and MSSQL

Due to limitations on data type conversion between MSSQL and Langstack, not all data types are supported when reading or writing to MSSQL. The two tables below show the level of the supported data conversion for reading and writing to MSSQL, where the supported data types are marked either with the color green or orange, representing the following:&#x20;

* **Allowed**: Marked in green with letter 'A' for 'allowed'. These conversions are allowed and fully supported without any data loss.&#x20;
* **With Warning**: Marked in orange with the letter ‘W’ for ‘warning’. These conversions are supported with a potential data loss, row skip or fall back to default value due to overflow. This is caused due to data incompatibility for example, mapping a string value to XML, while the string does not contain a valid XML value, or reading a numerical value from SQL to integer value in Langstack which causes data loss of the decimal data, or can set to default value if the numerical value is larger than the integer limit in Langstack.&#x20;
* **Blank (white space)**: Data type conversions that are not supported cause the ETL process to abort on initialization and if the ETL execution log is provided in the ETL template setup, the error message is logged. Users can see the last error message when opening the ETL template setup.&#x20;

{% hint style="info" %}
A summary is logged for conversions with ‘warning’ or ‘error’ messages.
{% endhint %}

### Data type conversions for Reading from MSSQL

The following table shows the supported data type conversions for reading from MSSQL to Langstack. In the table, the column under “From” displays the source (MSSQL) data types and the row “To” displays the destination (Langstack) data types.

<figure><img src="/files/wfPWjkRErRt3tX6RZZh6" alt=""><figcaption></figcaption></figure>

### Data type conversions for Writing to MSSQL

The following table shows the supported data type conversions for writing from Langstack to MSSQL. In the table, the row “From” displays the source (Langstack) data types and the column under “To” displays the destination (MSSQL) data types.

<figure><img src="/files/CAoP9lJfgOvLxUKRlIjX" alt=""><figcaption></figcaption></figure>

#### Special notes on types using MSSQL

**MS-SQL column identity:**&#x20;

The identity column identifies a certain row in an MS-SQL table. It is a numeric column that is auto-incremented with integer values when rows are inserted. There are six (6) data types that may be defined for identity columns:&#x20;

* Int
* Bigint
* Smallint
* Tinyint
* Numeric
* decimal.&#x20;

If the writer (destination) is MS-SQL, data cannot be written to the identity column and any attempts to write to the identity column will be ignored.


---

# 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.langstack.com/welcome/in-depth-learning/connectors/ms-sql-connector/mapping-data-types-between-langstack-and-ms-sql.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.
