Closed OrCh3n closed 2 months ago
hey, thanks for raising this ! so the Params
field is supposed to contain only connection and session parameters , hence the name. Please see this doc for reference.
if you're trying to use a session variable , which can be indeed be anything, can you please try specifying them per the documentation you linked; using the SET
statement after establishing the connection?
For example, SET customer_id='test'
ah, nevermind, I see now what you're referring to - JDBC is already supporting this notation you mentioned.
as you mentioned, the session variable indeed comes urlencoded
"SESSION_PARAMETERS": {
"%24CUSTOMER_ID": "test",
"CLIENT_VALIDATE_DEFAULT_PARAMETERS": true
},
and thus never actually recognized as a session variable, by the server. As a workaround, please consider using the method mentioned previously while we work on this enhancement for the driver to be on par with the JDBC driver regarding this aspect.
hopefully https://github.com/snowflakedb/gosnowflake/pull/1177 can address this. Thank you again for pointing this gap out !
Thanks for the quick response!
fix PR is now merged and will be part of the next upcoming release
released with gosnowflake v1.11.0 in July 2024
What version of GO driver are you using? v1.7.2
What operating system and processor architecture are you using? darwin/arm64
What version of GO are you using? 1.21.8
4.Server version:* E.g. 1.90.1 You may get the server version by running a query: 8.24.1
The issue is the $ is url encoded, so when parsing the config back from the url it is left url encoded, while it needs to be a $ sign. ParseDSN should decode the parameter keys IMO.