You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "s-banach (via GitHub)" <gi...@apache.org> on 2023/07/10 13:46:03 UTC
[GitHub] [arrow-adbc] s-banach opened a new issue, #890: Question: Why is `uri` a required argument?
s-banach opened a new issue, #890:
URL: https://github.com/apache/arrow-adbc/issues/890
I'm currently using `snowflake-connector-python` like this:
```python
conn = snowflake.connector.connect(
user=...,
password=...,
authenticator=...,
account=...,
warehouse=...,
role=...,
)
```
Then I use `conn` to query whatever database or schema I like.
In contrast, I'm looking at the documentation here:
https://arrow.apache.org/adbc/0.5.1/driver/snowflake.html
It seems that a `uri` is required, and every accepted `uri` format asks for a database.
Can anyone clarify how to use this driver the same way I use `snowflake-connector-python`?
Thanks for your time and consideration.
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm commented on issue #890: Question: Why is `uri` a required argument?
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-1644374869
#923 will make `uri` fully optional so you can just specify the properties above instead.
--
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
Re: [I] Question: Why is `uri` a required argument? [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-2164059928
Does https://arrow.apache.org/adbc/current/driver/snowflake.html#sso-authentication help?
```
import adbc_driver_snowflake.dbapi
# This will open a new browser tab, and block until you log in.
adbc_driver_snowflake.dbapi.connect(db_kwargs={
"adbc.snowflake.sql.account": "foobar",
"adbc.snowflake.sql.auth_type": "auth_ext_browser",
"username": "jdoe@example.com",
})
```
All options: https://arrow.apache.org/adbc/current/driver/snowflake.html#client-options
--
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
Re: [I] Question: Why is `uri` a required argument? [arrow-adbc]
Posted by "pkit (via GitHub)" <gi...@apache.org>.
pkit commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-2164072615
It's not an SSO, just regular, normal account with `user:password`.
Fortunately I've found out that it fails on password because it tries to URL-decode it and stumbles on `%` sign.
So, changing `%` -> `%25` in all passwords helps. And it starts working with URI. Non URI access doesn't work though.
--
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
[GitHub] [arrow-adbc] thomasaarholt commented on issue #890: Question: Why is `uri` a required argument?
Posted by "thomasaarholt (via GitHub)" <gi...@apache.org>.
thomasaarholt commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-1643796295
Hello! There is a check in the [cython code](https://github.com/apache/arrow-adbc/blob/5620b03d6839f87695510e55b58e74a8677ea5b9/python/adbc_driver_manager/adbc_driver_manager/_lib.pyx#L557) to ensure that uri is not None.
If `uri` is a downstream required string, then it might be better to allow uri to be None in the `connect` functions (in [`__init__`](https://github.com/apache/arrow-adbc/blob/5620b03d6839f87695510e55b58e74a8677ea5b9/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py#L97) and [`dbapi.py`](https://github.com/apache/arrow-adbc/blob/5620b03d6839f87695510e55b58e74a8677ea5b9/python/adbc_driver_snowflake/adbc_driver_snowflake/dbapi.py#L95) in the snowflake code), but construct it from the other kwargs if `uri=None`.
--
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
Re: [I] Question: Why is `uri` a required argument? [arrow-adbc]
Posted by "pkit (via GitHub)" <gi...@apache.org>.
pkit commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-2163762598
It still doesn't work at all and there's zero documentation on how it should be configured.
I.e.:
`adbc_driver_snowflake.dbapi.connect(conn_kwargs={"account": "XXXXX"})` : Nope
`adbc_driver_snowflake.dbapi.connect(db_kwargs={"account": "XXXXX"})` : Nope
`adbc_driver_snowflake.dbapi.connect(account="XXXXX")` : Nope
All result in `adbc_driver_manager.OperationalError: IO: 260000: account is empty`
Essentially making the connector totally unusable when password includes any special symbols (because connecting with URI fails miserably too).
--
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
Re: [I] Question: Why is `uri` a required argument? [arrow-adbc]
Posted by "salahfh (via GitHub)" <gi...@apache.org>.
salahfh commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-2651825607
Here's an example of solution for this one I've made. Might come in handy for a future reference.
[SnowflakeToPolars](https://github.com/salahfh/SnowflakeToPolars/blob/main/snowflake_polars.py)
--
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
[GitHub] [arrow-adbc] lidavidm commented on issue #890: Question: Why is `uri` a required argument?
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-1629038646
Hmm, it probably shouldn't be. https://github.com/apache/arrow-adbc/issues/841 is a similar question about R
--
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
[GitHub] [arrow-adbc] lidavidm closed issue #890: Question: Why is `uri` a required argument?
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #890: Question: Why is `uri` a required argument?
URL: https://github.com/apache/arrow-adbc/issues/890
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Question: Why is `uri` a required argument? [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-2164078105
The example is for SSO, but it's to demonstrate that the option is `"adbc.snowflake.sql.account": "foobar"`
The URL-decoding is...odd, but that appears to be a behavior of the Snowflake client or server
--
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
[GitHub] [arrow-adbc] zeroshade commented on issue #890: Question: Why is `uri` a required argument?
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-1629229531
Interestingly this appears to be an issue solely with the documentation. Looking at the code, as far as I can tell "uri" isn't required, you can specify the connection options just like in the python connector.
python connector option --> adbc connection option
`user` --> `username`
`password` --> `password`
`account` --> `adbc.snowflake.sql.account`
`warehouse` --> `adbc.snowflake.sql.warehouse`
`role` --> `adbc.snowflake.sql.role`
`authenticator` --> `adbc.snowflake.sql.auth_type`
All of these are in the documentation along with the available options for `auth_type`
--
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
[GitHub] [arrow-adbc] lidavidm commented on issue #890: Question: Why is `uri` a required argument?
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #890:
URL: https://github.com/apache/arrow-adbc/issues/890#issuecomment-1629263014
We might just need some examples then.
--
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