Feat/mssql python Add optional mssql-python backend, make pyodbc optional, and update docs / CI#681
Feat/mssql python Add optional mssql-python backend, make pyodbc optional, and update docs / CI#681axellpadilla wants to merge 10 commits into
Conversation
…d pyodbc backends
|
Ok, its a big change so will take a while to review, I can see a few issues I think so I'll find some time at start providing feedback. My main concern other than the actual code change is the install method for the adapter now changes as we have to specify the driver we want to use, that is a big change. This doesn't just affect us, DBT themselves will have the wrong install instructions. https://docs.getdbt.com/docs/local/connect-data-platform/mssql-setup?version=1.12#prerequisites |
Benjamin-Knight
left a comment
There was a problem hiding this comment.
Probably need some new tests as well but will look at those after these comments.
|
@Benjamin-Knight I'm moving this to v1.11, I'm more interested in the other patches for v1.10 and its true we will need more time holding the rc1 pending until dbt docs are updated |
…and docs matching and improve optional mssql-python support Upgrade to backend enum Update README install docs to explain the default pyodbc backend and optional mssql extra for mssql-python Add azure dep to lazy loading Add pyodbc as a core dependency and update mssql-python, azure-identity, and azure-core extras in pyproject.toml and uv.lock Add authentication normalization and validation for SQL Server profile fields Add mssql-python-specific connection string handling for MSI and Integrated auth flows Expand unit tests for mssql-python auth normalization and connection behavior
- Update `_validate_pyodbc_requirements()` to reject `None`, empty, and whitespace-only `driver` values - Add test covering `None`, `""`, and `" "` driver inputs
…hentication and connection string features - Added support for Active Directory access token authentication. - Improved handling of connection string sanitization for logging. - Introduced validation for connection requirements and query timeout. - Enhanced tests for various authentication methods and connection string formats. - Refactored connection handling to support new backend options.
|
@Benjamin-Knight Kept pyodbc by default and already running pyodbc part on production so changed milestone to v1.10.1, this way we don't need to update upstream docs still, and can announce deprecation if we really start to mostly use the new driver. |
Ok, Its a big change so we will want to have a much longer period for a release candidate then we did with the 1.9.1 release to give people time to feedback but I think its good to go now that the default behaviour is still pyodbc. Have you flipped the adapter into mssql driver mode for a large corpus of models? |
Going to on a couple days of pyodbc, current side effect is a speed gain on sqlfluff formatting because the lazy stuff |
This PR introduces the new optional mssql-python connection backend while keeping the legacy pyodbc ODBC path available as an explicit extra.
Key changes:
Why this change:
Testing: