Case sensitivity
Emulation context
SQL Server is typically configured to use case-insensitive collation, meaning object names like Customers
, customers
, and CUSTOMERS
are treated as equivalent.
In contrast, Microsoft Fabric Warehouse is case-sensitive by default. It treats differently cased identifiers as entirely separate objects. This affects table names, column names, procedure names, aliases, and other database objects.
This difference can lead to runtime errors in Fabric if casing is inconsistent across declarations and references. In larger databases, this inconsistency often goes unnoticed in SQL Server but will cause failures in Fabric unless explicitly corrected.
Emulation strategy
SQL Tran automatically rewrites object and identifier references to ensure consistent casing across all usage points, while conforming to Fabric’s case sensitivity rules where required.
It normalizes references to match the casing used in the original object definitions, ensuring that object names are applied consistently throughout the codebase.
This is done through static analysis of the SQL structure, allowing SQL Tran to accurately resolve and adjust identifier usage. As part of this process:
Table and column references are rewritten to match their declared casing.
Alias declarations and their usages are rewritten to lowercase to align with Fabric conventions.
Schema names, object prefixes, and other identifiers are adjusted as needed.
Casing is preserved in comments and string literals.
This automatic adjustment ensures that code written under SQL Server’s case-insensitive model will run reliably in Fabric’s case-sensitive environment, without requiring manual intervention.
Code example
SQL Server:
Fabric Warehouse (generated by SQL Tran):
Important notes
SQL Tran does not apply arbitrary casing conventions. It reflects the casing used in original object declarations and rewrites aliases to lowercase to comply with Fabric conventions.
Inconsistently cased references are not simply normalized. They are made explicitly compatible with Fabric’s strict case sensitivity rules.
This emulation does not affect string comparisons (e.g.,
WHERE Name = 'john'
). Such comparisons depend on collation and may require separate handling.
Last updated