Data types
Emulation context
SQL Server supports a rich set of data types, including Unicode strings (NVARCHAR
), legacy types (NTEXT
, MONEY
), and structured data types (XML
, DATETIMEOFFSET
).
These types are either unsupported or behave differently in Microsoft Fabric Warehouse, which is optimized for columnar, Parquet-based storage with a more constrained SQL type system.
Fabric Warehouse limits the available data types to those compatible with distributed storage and analytics workloads. Unsupported or partially supported types must be translated or removed to avoid deployment errors or runtime inconsistencies.
For example:
NVARCHAR
is not available; Fabric only supportsVARCHAR
, using UTF-8 collation for Unicode.MONEY
,NTEXT
, andXML
are not supported.DATETIMEOFFSET
is replaced byDATETIME2
, which omits timezone data.
Without proper conversion, schema deployment or query execution would fail after migration.
Emulation strategy
SQL Tran automatically rewrites unsupported or partially supported data types to Fabric-compatible equivalents. It applies safe defaults to preserve semantic intent while ensuring compatibility.
The following are examples of how SQL Tran transforms specific SQL Server types:
NVARCHAR(100)
VARCHAR(200)
Size doubled to accommodate UTF-8 encoding.
NTEXT
VARCHAR(MAX)
Legacy type converted to unbounded string.
DATETIMEOFFSET
DATETIME2(6)
Timezone offset removed.
DATETIME
DATETIME2(6)
Standardized with explicit precision.
DATETIME2
DATETIME2(6)
Precision enforced explicitly.
MONEY
DECIMAL(19,4)
Converted to fixed-point type.
XML
VARCHAR(MAX)
Serialized as text.
Data types like BIT
, FLOAT
, DATE
, UNIQUEIDENTIFIER
, VARBINARY(MAX)
, and INT
are preserved without modification.
Code example
SQL Server:
Fabric Warehouse (generated by SQL Tran):
Important notes
UTF-8 collation is assumed for all
VARCHAR
columns to support Unicode.A 2x size expansion for
NVARCHAR
is applied conservatively to avoid data truncation while maintaining optimal performance. You may adjust this further on a case-by-case basis if your data contains many multi-byte characters.PRIMARY KEY
constraints are preserved in the translated output, but rewritten using thePRIMARY KEY NONCLUSTERED ... NOT ENFORCED
pattern recommended by Microsoft Fabric.XML
is converted toVARCHAR(MAX)
, removing structure and losing support for XML features. Any existing XML logic will need to be rewritten outside Fabric.DATETIMEOFFSET
becomesDATETIME2(6)
, losing the time zone offset. Applications that rely on time zone–aware values may require changes.NTEXT
is converted toVARCHAR(MAX)
with encoding changed from UTF-16 to UTF-8. While content remains intact, binary differences may affect encoding-sensitive logic or legacy text access methods.
Last updated