Closed monai closed 11 months ago
SnowflakeLoginOptions()
is a temporary solution while we build something more robust & concrete. We have added snowflake.connector.connect(connection_name = "a_connection")
here. Could you please give it a try? We'll add support for snowpark soon.
Note: snowflake.ml
is not part of package snowflake-snowpark-python
.
SnowflakeLoginOptions()
is a temporary solution while we build something more robust & concrete. We have addedsnowflake.connector.connect(connection_name = "a_connection")
here. Could you please give it a try? We'll add support for snowpark soon.
snowflake.connector.connect(connection_name = "a_connection")
doesn't work either:
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/snowflake/connector/config_manager.py", line 171, in _get_config
e = e[k]
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/tomlkit/container.py", line 613, in __getitem__
raise NonExistentKey(key)
tomlkit.exceptions.NonExistentKey: 'Key "connections" does not exist.'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/juozas/projects/lt/spml/transformations.py", line 37, in <module>
snowflake.connector.connect(connection_name = "a_connection")
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/snowflake/connector/__init__.py", line 51, in Connect
return SnowflakeConnection(**kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/snowflake/connector/connection.py", line 343, in __init__
connections = CONFIG_PARSER["connections"]
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/snowflake/connector/config_manager.py", line 364, in __getitem__
return self._options[name].value()
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/snowflake/connector/config_manager.py", line 113, in value
value = self._get_config()
File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/snowflake/connector/config_manager.py", line 173, in _get_config
raise MissingConfigOptionError( # TOOO: maybe a child Exception for missing option?
snowflake.connector.errors.MissingConfigOptionError: Configuration option 'connections' is not defined anywhere, have you forgotten to set it in a configuration file, or environmental variable?
My ~/.snowsql/config
:
[connections]
[connections.a_connection]
accountname = xxx
region = xxx
username = xxx
private_key_path = xxx
dbname = xxx
schemaname = xxx
warehousename = xxx
rolename = xxx
@monai You'd want to move your config file from ~/.snowsql/config
to ~/.snowflake/config.toml
Hopefully that's the only reason why this isn't working for you!
@monai could you please try with version 1.0.5
?
snowflake conda release happened. Closing the bug w/o confirmation. Please reopen if issue recur.
SnowflakeLoginOptions()
expectspassword
property in a named connection config despiteprivate_key_path
is being used.Version: snowflake-snowpark-python 1.5.1 Python: 3.10.12 OS: macOS