sfguide-data-engineering-with-snowpark-python
sfguide-data-engineering-with-snowpark-python copied to clipboard
Error getting snowsql config details
When running the 02_load_raw.py
file, there is an error as seen below.
`Traceback (most recent call last): File ".\sfguide-data-engineering-with-snowpark-python\utils\snowpark_utils.py", line 74, in get_snowsql_config session_config = config[connection_path] File ".\miniconda3\envs\pysnowpark\lib\configparser.py", line 960, in getitem raise KeyError(key) KeyError: 'connections.dev'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "02_load_raw.py", line 76, in
This error occurs because the code looks for the variable connections.dev in my snowsql config file. In my case, this connection was not named dev but a more specific name.
[connections.snowpark_login] accountname = myaccount.west-europe.azure username = my_user password = my_password
Thus it cannot find login details in the config file. I fixed it for now by hardcoding my own naming at line 54 in the snowpark_utils.py
file but there should either be a dynamic way to search for the login credentials or the quickstart should specify explicitly that you need to name the connection in this way.