Repository navigation
Support Microsoft Fabric / Synapse warehouses and Entra ID access tokens - #1432
Open
lucaspearson wants to merge 2 commits into
Open
lucaspearson wants to merge 2 commits into
lucaspearson wants to merge 2 commits into
Conversation
- Default tds_version to 7.4 when an access_token is configured.
Microsoft Entra ID federated authentication (TinyTDS :access_token)
needs TDS 7.4, and the 7.3 default silently disabled it.
- Skip the WITH (NOLOCK) table hint in the INFORMATION_SCHEMA queries
when connected to a data warehouse. Azure Synapse dedicated SQL pools
and Microsoft Fabric Warehouse report "Microsoft Azure SQL Data
Warehouse" and reject table hints ("Table hint NOLOCK is not
allowed"), which broke column and view introspection.
Tested against a Microsoft Fabric Warehouse with a TinyTDS
:access_token: connect, count, where/order/limit, group/count, date
grouping, find_by_sql with binds, inserts and pooled reconnects.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets the adapter connect to Azure Synapse dedicated SQL pools and Microsoft Fabric Warehouse, including with Microsoft Entra ID access tokens. Refs #1011.
Changes
tds_versionto 7.4 when anaccess_tokenis configured. TinyTDS federated authentication needs 7.4, and the 7.3 default silently disabled it. An explicittds_versionstill wins.WITH (NOLOCK)on warehouses: addsqlserver_data_warehouse?(true when@@VERSIONreports "Microsoft Azure SQL Data Warehouse", as Synapse and Fabric do). Skip theWITH (NOLOCK)hint in theINFORMATION_SCHEMA.TABLESandINFORMATION_SCHEMA.VIEWSqueries there, since warehouses reject table hints ("Table hint NOLOCK is not allowed"), which broke column and view introspection.The
@@LANGUAGEdate format change from #1341, which Fabric also needs, is already on main.Depends on:
access_tokenreaches TinyTDS through the existing config pass-through. TinyTDS support is in rails-sqlserver/tiny_tds#616; without it the option has no effect.Testing:
tds_versiondefaults (with, without, and explicit) and for warehouse detection and the NOLOCK-free schema SQL, using stubs so they run on SQL Server in CI.find_by_sqlwith binds, inserts and pooled reconnects. On main it's covered by the tests above; I haven't run main itself against Fabric.🤖 Generated with Claude Code