Allow MsSQL destination to support passwordless authentication via a token.
This token is typically obtained using azure.identity.DefaultAzureCredential() but it can also be obtained via other methods like OIDC.
Are you a dlt user?
Yes, I'm already a dlt user.
Use case
I'm looking to get DLT setup reading/writing to MsSQL running in Azure and am hoping to use a passwordless connection.
Proposed solution
Looking at the current implementation, this might be as simple as modifying MsSqlCredentials to accept either a username/password or a token. If present, this token would then be included in pyodbc.connect via the attrs_before argument. If this sounds like an OK approach I am happy to draft a PR.
I experimented with doing a slightly underhanded runtime patch of pyodbc.connect with the added token and this seemed to work OK with DLT loading a table quite happily.
Feature description
Allow MsSQL destination to support passwordless authentication via a token.
This token is typically obtained using
azure.identity.DefaultAzureCredential()
but it can also be obtained via other methods like OIDC.Are you a dlt user?
Yes, I'm already a dlt user.
Use case
I'm looking to get DLT setup reading/writing to MsSQL running in Azure and am hoping to use a passwordless connection.
Proposed solution
Looking at the current implementation, this might be as simple as modifying
MsSqlCredentials
to accept either a username/password or a token. If present, this token would then be included inpyodbc.connect
via theattrs_before
argument. If this sounds like an OK approach I am happy to draft a PR.I experimented with doing a slightly underhanded runtime patch of
pyodbc.connect
with the added token and this seemed to work OK with DLT loading a table quite happily.Related issues
No response