-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to explicitly specify Azure TokenCredential
in storage_options
#20635
Comments
Could you try checking if you can read using a custom def provider():
token = MyCustomCredential().get_token()
return {
"bearer_token": token.token,
}, token.expires_on
pl.read_parquet(..., credential_provider=provider) Footnotes |
Yes, it works. However, allowing optionally setting
Easy to useThe suggested approach requires understanding both PyPolars
|
I've been bumping into this here: Pandas (and fsspec) solve this by allowing one to directly pass the Azure Identity credential object into the credential = DefaultAzureCredential()
storage_options = {"credential": credential} However, Polars requires the A more ergonomic approach might be to allow passing the credential object directly, then automatically wrap it in the appropriate |
Description
CredentialProviderAzure
, introduced by #20384, usesDefaultAzureCredential
by default.DefaultAzureCredential
works well in most cases. However, in some corner cases, we must use a more specialisedTokenCredential
or a customTokenCredential
.To make the Entra ID-based authentication in Polars more flexible, I propose to allow users to optionally specify an Azure
TokenCredential
object instorage_options
.The specified
TokenCredential
should be propagated toCredentialProviderAzure
.The text was updated successfully, but these errors were encountered: