Skip to content

Migrate the MS SQL family destinations (mssql, synapse, fabric) from pyodbc to mssql-python #4143

Description

@sdebruyn

Feature description

Switch the mssql, synapse, and fabric destinations from pyodbc to Microsoft's official mssql-python driver.

Use case

The MS SQL family destinations connect through pyodbc, which needs a system-installed ODBC driver (msodbcsql18) and unixODBC. That system dependency is the main friction point:

  • it has to be installed and kept in sync on every developer machine and CI runner, with platform-specific steps;
  • it complicates ARM and macOS setups;
  • it makes running the destination integration tests locally (for example in Docker) harder than it needs to be.

Proposed solution

Migrate to mssql-python, Microsoft's DB-API driver that bundles its own native driver, so the msodbcsql18/unixODBC system dependency goes away. The connection model stays the same, including Entra ID access-token injection via attrs_before.

Behavior differences the migration accounts for:

  • the driver is bundled, so no DRIVER= keyword and no msodbcsql18 install are needed;
  • long/max types (for example varchar(max)) are handled natively, so the LongAsMax connection keyword is dropped;
  • the connection-string parser only accepts a fixed set of keywords, so unsupported keywords are removed rather than passed through;
  • exception mapping uses the driver's stable driver_error label instead of parsing message text.

Related issues

N/A

Metadata

Metadata

Assignees

Labels

destinationIssue with a specific destinationenhancementNew feature or requestneeds decisionActionable; needs maintainer decision on whether to implement.

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions