Snowflake SDK Configuration: CertificateError
I had to wrestle with getting the Snowflake SDK working, kept encountering the error:
250001: Could not connect to Snowflake backend after 0 attempt(s).Aborting.
The underlying error to which was:
SSLError(CertificateError("hostname 'sk78217.us-east-2.snowflakecomputing.com' doesn't match either of '*.us-west-2.snowflakecomputing.com', '*.us-west-2.aws.snowflakecomputing.com', '*.global.snowflakecomputing.com', '*.snowflakecomputing.com', '*.prod1.us-west-2.aws.snowflakecomputing.com', '*.prod2.us-west-2.aws.snowflakecomputing.com'"))
I read much on the tubes about how region needs to be set, the account name configured, some places indicating region and cloud provider should be passed with account name, etc., etc. If you haven’t already, it helps to read:
But the following is what worked for me:
- In snowSet region to ‘us-west-2’ (I did this even though my account is in ‘us-east-2’)
- For account name, pass ‘<org>-<account>’. The URL becomes ‘<org>-<account>.snowflakecomputing.com`.
So with my config file having:
region = us-west-2 username = <username> password = <password> dbname = demo schemaname = public warehousename = compute_wh
the following was able to work:
√ ~/.snowsql 18:22:53 % snowsql -a <org>-<account> * SnowSQL * v1.2.23 Type SQL statements or !help <username>#COMPUTE_WH@DEMO.PUBLIC>