Using Account Identifiers for Connecting to Your Accounts¶
This topic provides information about connecting to accounts in your organization. For information about account identifiers, see Account Identifiers.
In this Topic:
Supported Methods for Connecting to Snowflake¶
Connecting via URL¶
Feature |
Account Name |
Account Locator |
---|---|---|
Standard URL |
|
|
Private Connectivity URL [2], [3], [4] |
|
|
SSO setup [1] |
|
|
SSO [1] |
See below. |
[1] For more information, see:
[2] For more information, see How to Set up SSO for PrivateLink URL Using SAML2 Integration
[3] Using private connectivity requires updating DNS records to include the private connectivity URL. For more information, see:
Google Cloud Private Service Connect DNS setup in Step 8.
Use SYSTEM$GET_PRIVATELINK_CONFIG to verify the URL format to connect to Snowflake.
[4] Currently, private connectivity to the Snowflake service using the account name format is not supported for SnowSQL, connectors, and drivers. As a workaround, use the account locator format.
Drivers¶
Each client, connector, and driver specifies the account identifier values to use to connect to Snowflake.
To obtain the private connectivity URL value to connect to Snowflake, call the SYSTEM$GET_PRIVATELINK_CONFIG in your Snowflake account. For details, see Account Identifiers for Private Connectivity.
- 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¶
The account locator and account locator URL will continue to work for all features and nothing will break.
The new account name and URL will also work in parallel to the account locator/URL and be the basis for new URL features going forward (for example client failover redirect URLs).
There are no near term plans to deprecate the account locator and account locator URL.