You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the DSN option is only compatible to user/password authentication (snowflake.OptionValueAuthSnowflake) since it is ensured by calling gosnowflake.ParseDSN to necessarily contain both of these fields. In a scenario where the user requires other types of authentication that do not rely on passwords (e.g. private key), if they wish to specify session parameters, they would have to construct a DSN with "mocked" password values, and additionally provide the account, in order to successfully specify the parameters in URI query format. Then, use the options to provide the correct authentication.
Otherwise, the user sends ALTER SESSION SET to set all parameters.
Instead, the driver could accept session parameters as a new option e.g. adbc.snowflake.sql.session_parameters expecting an encoded URI query segment. For instance:
Then the driver can decode these values using url.ParseQuery and send the ALTER SESSION statement to set all session parameters, which saves the effort for the user.
The text was updated successfully, but these errors were encountered:
so this would be the way to pass session parameters when you aren't using a URI at all? Am I understanding correctly?
@zeroshade I think that is one way to put it.
At least from my testing, I could not set the URI to just the session parameters portion, so my understanding is that the only way to specify session parameters with the ADBC driver is to do the whole authentication with the DSN string, which does not seem possible for private key auth.
What feature or improvement would you like to see?
If using
adbc.OptionKeyURI
to provide the DSN, multiple session parameters can be specified:https://arrow.apache.org/adbc/current/driver/snowflake.html#uri-format
However, the DSN option is only compatible to user/password authentication (
snowflake.OptionValueAuthSnowflake
) since it is ensured by callinggosnowflake.ParseDSN
to necessarily contain both of these fields. In a scenario where the user requires other types of authentication that do not rely on passwords (e.g. private key), if they wish to specify session parameters, they would have to construct a DSN with "mocked" password values, and additionally provide the account, in order to successfully specify the parameters in URI query format. Then, use the options to provide the correct authentication.Otherwise, the user sends
ALTER SESSION SET
to set all parameters.Instead, the driver could accept session parameters as a new option e.g.
adbc.snowflake.sql.session_parameters
expecting an encoded URI query segment. For instance:Then the driver can decode these values using url.ParseQuery and send the ALTER SESSION statement to set all session parameters, which saves the effort for the user.
The text was updated successfully, but these errors were encountered: