Connecting to your accounts¶
This topic provides the URL and account identifier formats that you use to connect to the Snowflake accounts in your organization.
Note
If you are an organization administrator and want to delete old URLs for an account that has changed, see Managing account URLs.
Connecting to the Snowflake web interface¶
To connect to Snowsight using your web browser, see Signing in to Snowsight.
Connecting with a URL¶
Snowflake supports multiple URL formats when connecting to a Snowflake account without a browser. For example, an identity provider might use a direct URL to communicate with Snowflake.
The account name format uses the name of the account and its organization to identify the account. To find the name of your organization and account, see Finding the organization and account name for an account.
The connection name format, which replaces the account name with the name of a connection, is required when using the Client Redirect feature. To find the name of your connection, execute the SHOW CONNECTIONS command.
The legacy account locator format is currently supported, but its use is discouraged.
Standard account URLs¶
The standard URL format can be used in most cases where a Snowflake account URL is required, including:
SSO connections (except Okta)
SCIM base URL (except Okta)
OAuth connections with third-party identity providers (except Okta)
OAuth base URL for a Snowflake Authorization Server
The standard URL formats are:
Account name:
https://<orgname>-<account_name>.snowflakecomputing.com
Connection name:
https://<orgname>-<connectionname>.snowflakecomputing.com
Account locator (legacy):
https://<accountlocator>.<region>.<cloud>.snowflakecomputing.com
Private connectivity URLs¶
When connecting to Snowflake using private connectivity to the Snowflake service (e.g. AWS PrivateLink), the string privatelink
must be
appended to the account identifier in the Snowflake account URL.
Account Name:
https://<orgname>-<account_name>.privatelink.snowflakecomputing.com
Connection Name:
https://<orgname>-<connectionname>.privatelink.snowflakecomputing.com
Account Locator (legacy):
https://<account_locator>.<region>.privatelink.snowflakecomputing.com
Note that using private connectivity requires updating DNS records to include the private connectivity URL. For more information, see:
Azure Private Link DNS setup in the configuration procedure.
Google Cloud Private Service Connect DNS setup in Step 8.
Okta URLs¶
When using Okta for SSO, SCIM, or OAuth, you must use a special account name format if the account name contains an underscore. Because Okta does not support underscores in URLs, the underscore in the account name must be converted to a hyphen.
Account name:
https://<orgname>-<account-name>.snowflakecomputing.com
Connection name: Use the standard URL
Account locator (legacy): Use the standard URL
Connecting with clients, connectors, and drivers¶
Clients, connectors, and drivers use a variety of syntaxes to connect to Snowflake. In general, you should use the variation that includes
the organization name (orgname
) and account name (account_name
), with the following exceptions:
If you use the Client Redirect feature, replace the name of the account (
account_name
) with the name of the connection (connection_name
). For examples of this syntax, see Using a connection URL.Currently, private connectivity to the Snowflake service using the account name format is not supported. As a workaround, append
privatelink
to the account locator syntax. To verify which value you should use to connect to Snowflake when using private connectivity, call the SYSTEM$GET_PRIVATELINK_CONFIG function in your Snowflake account.
- SnowSQL:
Account name:
snowsql -a <orgname>-<account_name>
Account locator:
snowsql -a <account_locator>
- JDBC:
Account name:
jdbc:snowflake://<orgname>-<account_name>.snowflakecomputing.com/?<connection_params>
Account locator:
jdbc:snowflake://<account_locator>.snowflakecomputing.com/?<connection_params>
- ODBC:
Account name:
Server:
<orgname>-<account_name>.snowflakecomputing.com
Account locator:
Server:
<account_locator>.snowflakecomputing.com
- Python:
Account name:
Set the
ACCOUNT
parameter value as<orgname>-<account_name>
.
Account locator:
Set the
ACCOUNT
parameter value as<account_locator>.<region_id>.<cloud>
.
- .Net:
Account name:
Set the
ACCOUNT
parameter value as<orgname>-<account_name>
.Set the
HOST
parameter value as the default (.snowflakecomputing.com
).
Account locator:
Set the
ACCOUNT
parameter value as<account_locator>
.Set the
HOST
parameter value as the default.snowflakecomputing.com
. Specify if your Snowflake account is not in theus-west
region.
- Golang:
Account name:
db, err := sql.Open("snowflake", "jsmith:mypassword@<orgname>-<account_name>/mydb/testschema?warehouse=mywh")
Account locator:
sql.Open("snowflake", "jsmith:mypassword@<account_locator>/mydb/testschema?warehouse=mywh")
- node.js:
Account name: Set the
ACCOUNT
parameter value as<orgname>-<account_name>
.Account locator: Set the
ACCOUNT
parameter value as<account_locator>.<region_id>.<cloud>
.
- Spark (connector):
Account name: Same as JDBC
Account locator: Same as JDBC
- Spark (Databricks):
Account name:
<Account URL for Snowflake account>
Account locator:
<Account Locator URL for Snowflake account>
- Spark (Qubole):
Account name: Set the Host Address field value as
<orgname>-<account_name>.snowflakecomputing.com
.Account locator: Set the Host Address field value as
<account_locator>.snowflakecomputing.com
.
- PHP:
Account name:
Set the
ACCOUNT
parameter value as<orgname>-<account_name>
.Leave the
REGION
parameter value blank for all regions.
Account locator:
Set the
ACCOUNT
parameter value as<account_locator>
.Set the
REGION
parameter value if your Snowflake account is not in theus-west
region.
- SQLAchemy:
Account name:
snowflake://<user_login_name>:<password>@<orgname>-<account_name>
Account locator:
snowflake://<user_login_name>:<password>@<account_locator>.<region_id>.<cloud>
Backwards compatibility¶
Using the legacy account locator in an account identifier or account URL is still supported, though discouraged.