Default values emulation
Last updated
Last updated
In Synapse Analytics, columns can have default values defined in the table schema, allowing INSERT
operations to omit those columns and still generate meaningful values automatically. Common defaults include timestamps, status flags, or unique identifiers.
However, Microsoft Fabric Warehouse does not support column-level default constraints — any default behavior must be handled explicitly in application logic.
SQL Tran addresses this by removing unsupported default definitions from table schemas and rewriting INSERT
statements to explicitly supply the appropriate default values.
This ensures that data insertion behavior remains consistent without requiring manual code refactoring, preserving the original logic even when migrating large and complex schemas.
(For more information, see the following emulation reference page: )
Synapse Analytics:
Fabric Warehouse (generated by SQL Tran):
In the example shown, a procedure inserts a row into the Emulations.NameStatuses
table. This table defines a Status
column with a default value.
In the original source SQL, the INSERT INTO ... VALUES ...
statement omits the Status
column, relying on the database default behavior — a strategy that would fail in Fabric.
SQL Tran emulates this default behavior by rewriting the INSERT
statement to explicitly provide the default value in the target SQL.
In this case, both identity column emulation and default value emulation are applied to ensure complete compatibility.
This automation eliminates the need for time-consuming manual corrections and preserves expected data behavior during migration.