SNOW-1042924: Default connection parameters not working
Closed this issue · 3 comments
guy-adams commented
SnowCLI version
SnowCLI Version: 2.0.0
Python version
Python 3.8.16
Platform
Linux-5.15.0-1023-aws-x86_64-with-glibc2.29
What happened
When I create a config toml file according to https://docs.snowflake.com/en/user-guide/snowsql-start#configuring-default-connection-settings
$ cat ~/.config/snowflake/config.toml
[connections]
accountname = "aaaa" # Account identifier to connect to Snowflake.
username = "bbbb" # User name in the account. Optional.
password = "cccc" # User password. Optional.
dbname = "dddd" # Default database. Optional.
And then run:
snow connection list --debug
+------------------------------+
| connection_name | parameters |
|-----------------+------------|
| accountname | aaaa |
| username | bbbb |
| password | cccc |
| dbname | dddd |
+------------------------------+
It seems to interpret each of these as a separate connection, not default connection parameters
Console output
+------------------------------+
| connection_name | parameters |
|-----------------+------------|
| accountname | aaaa |
| username | bbbb |
| password | cccc |
| dbname | dddd |
+------------------------------+
How to reproduce
$ cat ~/.config/snowflake/config.toml
[connections]
accountname = "aaaa" # Account identifier to connect to Snowflake.
username = "bbbb" # User name in the account. Optional.
password = "cccc" # User password. Optional.
dbname = "dddd" # Default database. Optional.
And then run:
snow connection list --debug
+------------------------------+
| connection_name | parameters |
|-----------------+------------|
| accountname | aaaa |
| username | bbbb |
| password | cccc |
| dbname | dddd |
+------------------------------+
sfc-gh-astus commented
Hi, Snow SQL has different config than SnowCLI, we didn't release documentation for 2.0.0 yet. Your connection is missing a name, should be:
[connections.name_of_connection]
accountname = "aaaa" # Account identifier to connect to Snowflake.
username = "bbbb" # User name in the account. Optional.
password = "cccc" # User password. Optional.
dbname = "dddd" # Default database. Optional.
sfc-gh-anugupta commented
Updated docs for 2.0 is now published at https://docs.snowflake.com/LIMITEDACCESS/snowcli-v2/snowcli-guide
sfc-gh-turbaszek commented
Closing as it seems the issue can be solved by using proper config format.