SQL Tran Docs
  • Overview
    • About
    • Getting started
    • Object lifecycle
    • Why is there no AI inside?
    • Performance considerations
    • Security considerations
    • Assessment
    • Unlocking projects
    • Interface walk-through
    • Translation scenarios
    • Prerequisites for Azure Marketplace deployment
  • Emulation scenarios
    • Emulation in SQL Tran
    • SQL Server to Fabric Warehouse
      • Data types
      • Case sensitivity
      • Cursors
        • Basic cursor loop
        • Cursor types
        • Fetch direction modes
        • Cursors in control flow
        • Nested cursors
        • Data modification cursors
        • Multiple cursors
        • Subqueries and filtering
      • Named procedure parameters
      • Result set limiting
      • MERGE statements
      • Computed columns
      • Temporary tables
      • External tables
      • Identity columns
      • Default values
      • Sequences
      • Unsupported system features
    • Synapse Analytics to Fabric Warehouse
      • Data types
      • Case sensitivity
      • Named procedure parameters
      • Result set limiting
      • MERGE statements
      • Temporary tables
      • External tables
      • Identity columns
      • Default values
      • Materialized views
      • Create table as select (CTAS)
      • Unsupported system features
    • SQL Server to Synapse Analytics
    • Oracle to PostgreSQL
  • Project wizard
    • Source database
    • Target database
    • Wrapping up
  • Projects
    • Project list
    • Overview
    • Workspace
    • Reports
    • Tests
    • Scratch pad
    • Settings
      • Project name
      • Mapping
      • Database connections
    • Navigation
    • Object complexity
    • Static analysis
    • Translation errors
    • Exporting and importing projects
  • Workspace
    • Object tree
    • Data lineage
    • Code
    • Actions
      • Overriding source
      • Overriding target
      • Ignoring objects
  • Tests
    • Workflow
    • Configure SQL Tran
    • Connecting to databases
      • Fabric Warehouse
      • Synapse Dedicated SQL Pool
      • Azure SQL Database, Azure SQL Managed Instance, Microsoft SQL Server
    • Tables
    • Views
    • Procedures
    • Functions
    • Triggers
    • Performance tests
  • Scripter
    • About
    • Supported databases
    • SQL Server
    • Azure SQL
    • Synapse Dedicated Pool
    • Oracle
    • PostgreSQL
    • MySQL
  • Microsoft training - SQL Tran
    • Introduction
    • Licensing plans
    • Deploying and activating
    • Creating a new project
    • Exploring the "Overview" screen
Powered by GitBook
On this page
  • Emulation context
  • Emulation strategy
  • Code example
  • Important notes
  1. Emulation scenarios
  2. Synapse Analytics to Fabric Warehouse

Data types

Emulation context

Azure Synapse Analytics (dedicated SQL pools) supports a wide range of SQL Server-compatible data types, including Unicode types like NVARCHAR, legacy types such as NTEXT, MONEY, and TEXT, and extended types such as DATETIMEOFFSET. These types offer compatibility for traditional SQL Server workloads and flexibility in ETL pipelines.

However, Microsoft Fabric Warehouse supports a reduced and simplified type system, optimized for distributed analytics and Parquet-backed columnar storage. Several Synapse data types are either unsupported or behave differently in Fabric.

For example:

  • NVARCHAR is not supported. Fabric uses VARCHAR with UTF-8 encoding for Unicode data.

  • NTEXT, TEXT, and MONEY are not supported at all.

  • DATETIMEOFFSET is replaced by DATETIME2, which removes time zone information.

These incompatibilities may result in schema deployment failures or runtime behavior differences unless addressed through automated translation or manual refactoring.


Emulation strategy

SQL Tran automatically converts Synapse data types to their nearest Fabric-compatible equivalents to ensure successful translation and deployment. The goal is to preserve data semantics where possible while enforcing compatibility with Fabric’s SQL surface.

Typical translation behaviors include:

  • NVARCHAR(n) → VARCHAR(n * 2) — SQL Tran doubles the length to preserve UTF-8 compatibility.

  • NCHAR(n) → CHAR(n * 2) — similarly expanded for Unicode content.

  • NTEXT, TEXT → VARCHAR(MAX) — legacy text types are converted to UTF-8 encoded strings.

  • MONEY → DECIMAL(19,4) — fixed precision is applied to preserve currency semantics.

  • TINYINT → SMALLINT — due to lack of native support in Fabric.

  • DATETIMEOFFSET → DATETIME2(6) — time zone offset data is removed.

  • DATETIME → DATETIME2(6) — precision is increased for consistency across datetime usage.

  • SMALLDATETIME → DATETIME2(6) — promoted to preserve time detail.

  • BINARY(n) → VARBINARY(n) — fixed binary types are rewritten to variable-length.

The following types are retained without modification:

  • INT, BIGINT, SMALLINT

  • FLOAT, REAL, DECIMAL, NUMERIC

  • BIT, DATE, TIME(n), DATETIME2(n)

  • VARBINARY(n), UNIQUEIDENTIFIER

  • VARCHAR(n), CHAR(n)

Expressions used within SELECT statements (e.g., CAST(...), CONVERT(...), UPPER(...)) are retained without modification.


Code example

Synapse Analytics:

CREATE TABLE SampleDataTypes (
    ID INT NOT NULL,
    Name NVARCHAR(100),
    Description NTEXT,
    CreatedAt DATETIMEOFFSET,
    RegisteredAt DATETIME,
    BirthDate DATE,
    LastLogin DATETIME2,
    Score FLOAT,
    Balance MONEY,
    IsActive BIT,
    Document VARBINARY(MAX),
    UserID UNIQUEIDENTIFIER,
    PriorityLevel TINYINT
);

Fabric Warehouse (generated by SQL Tran):

CREATE TABLE SampleDataTypes (
    ID INT NOT NULL,
    Name VARCHAR(200) /* SQLTRAN FIX: NVARCHAR(100) */,
    Description VARCHAR(MAX) /* SQLTRAN FIX: NTEXT */,
    CreatedAt DATETIME2(6) /* SQLTRAN FIX: DATETIMEOFFSET */,
    RegisteredAt DATETIME2(6) /* SQLTRAN FIX: DATETIME */,
    BirthDate DATE,
    LastLogin DATETIME2(6) /* SQLTRAN FIX: DATETIME2 */,
    Score FLOAT,
    Balance DECIMAL(19,4) /* SQLTRAN FIX: MONEY */,
    IsActive BIT,
    Document VARBINARY(MAX),
    UserID UNIQUEIDENTIFIER,
    PriorityLevel SMALLINT /* SQLTRAN FIX: TINYINT */
);

Important notes

  • UTF-8 collation and size expansion: Fabric assumes UTF-8 encoding for all VARCHAR and CHAR columns. SQL Tran compensates for multibyte characters by doubling the declared length of NVARCHAR and NCHAR types to avoid truncation. Users should validate these conversions based on real-world data sizes.

  • Unsupported types: Unsupported types are either rewritten or rejected during translation. NTEXT, TEXT, and MONEY are rewritten to compatible Fabric types. TINYINT is not supported in Fabric and is replaced with SMALLINT.

  • Temporal conversions: During conversion, DATETIMEOFFSET loses its time zone information, as Fabric does not support time zone–aware types. Both SMALLDATETIME and DATETIME are promoted to DATETIME2(6) to ensure consistent precision and compatibility.

  • Binary handling: BINARY(n) columns are rewritten as VARBINARY(n) to align with Fabric’s supported binary types.

  • Expression preservation: SQL Tran does not alter inline expressions using T-SQL functions such as CAST, CONVERT, or UPPER.

  • Manual review recommended: For full compatibility, developers should review any columns that use unsupported types. Time zone–dependent logic based on DATETIMEOFFSET may require revision, as Fabric does not support time zone–aware datatypes. Currency formatting or rounding logic based on the MONEY type should be verified for precision consistency.

PreviousSynapse Analytics to Fabric WarehouseNextCase sensitivity

Last updated 13 days ago

Data types emulation in SQL Tran