What is correct "account identifier" to use in order to connect streamlit to snowflake?

hi there. I am trying to create an app which connects to my snowflake database.

I am following these docs: Connect Streamlit to Snowflake - Streamlit Docs

and using the “Using the Snowflake Connector for Python” method.

my secrets.toml file reads like the example in the docs:

# .streamlit/secrets.toml

url = "snowflake://<user_login_name>:<password>@<account_identifier>/<database_name>/<schema_name>?warehouse=<warehouse_name>&role=<role_name>"

however when streamlit is attempting to authenticate i am getting the following error:

OperationalError: (snowflake.connector.errors.OperationalError) 250001: Could not connect to Snowflake backend after 1 attempt(s).Aborting (Background on this error at: https://sqlalche.me/e/14/e3q8)

for the snowflake account identifier I am using the copied account identifier from the snowflake console

which takes the form ABCDEFGF.XYZ12345 … given how many “versions” of the account identifier there have been in the snowflake system over time, I am not sure this is correct. Can someone advise how to correctly provide the account identifier value in this connection framework? thanks.

Can you try ABCDEFGF-XYZ12345 instead of ABCDEFGF.XYZ12345?

ABCDEFGF.XYZ12345 is for sql queries whereas ABCDEFGF-XYZ12345 is for most URLs and general purpose usage

You can find more information regarding this here

1 Like

I am encountering same issues, please were you able to find a fix

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.