Step 1. Log into SnowSQL¶
Open a terminal window.
$ snowsql -a <account_identifier> -u <user_name>
Unique identifier for your Snowflake account.
The preferred format of the account identifier is as follows:
Names of your Snowflake organization and account. For details, see Format 1 (Preferred): Account Name in Your Organization.
Alternatively, specify your account locator, along with the region and cloud platform, in the form
<locator>.<region>.<cloudprovider>, where the account is hosted, if required. For details, see Format 2 (Legacy): Account Locator in a Region.
<user_name>is the login name for your Snowflake user.
If your account has an identity provider (IdP) that has been defined for your account, you may use a web browser to authenticate instead of a password, as the following example demonstrates.
$ snowsql -a <account_identifier> -u <user_name> --authenticator externalbrowser
For more information, refer to Using a Web Browser for Federated Authentication/SSO.
When prompted by SnowSQL, enter the password for your Snowflake user.
If you log in successfully, SnowSQL displays a command prompt that includes your current warehouse, database, and schema.
If you get locked out of the account and cannot obtain the account identifier, you can find it in the Welcome email that Snowflake sent to
you when you signed up for the trial account, or you can work with your
ORGADMIN to get the account details.
You can also find the values for
in the Welcome email.
If your Snowflake user does not have a default warehouse, database, and schema, or if
you did not configure SnowSQL to specify a default warehouse, database, and schema,
the prompt displays
no database, and
no schema. For example:
user-name#(no warehouse)@(no database).(no schema)>
This prompt indicates that there is no warehouse, database, and schema selected for the current session. You create these objects in the next step. As you follow the next steps in this tutorial to create these objects, the prompt automatically updates to include the names of these objects.
For more details, see Connecting Through SnowSQL.