You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "thomasaarholt (via GitHub)" <gi...@apache.org> on 2023/11/06 14:50:27 UTC
Re: [I] [snowflake] MFA token not being cached? [arrow-adbc]
thomasaarholt commented on issue #918:
URL: https://github.com/apache/arrow-adbc/issues/918#issuecomment-1795005777
In my previous post I had written `"cache_mfa_token": "true", # this one is unnecessary on Mac`. That was complete nonsense 😅 .
Closing this with a final, working code example, using a double context manager to close the connection and cursor.
```python
with dbapi.connect(
uri=uri,
db_kwargs={
"adbc.snowflake.sql.client_option.cache_mfa_token": "true",
"adbc.snowflake.sql.auth_type": "auth_mfa",
},
) as conn:
with conn.cursor() as cursor:
cursor.execute(query)
tbl = cursor.fetch_arrow_table()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org