Snowflake
Steps and required credentials to connect Snowflake to Squadbase
Required Information
| Field | Description |
|---|---|
| Snowflake Account | The account identifier that identifies your Snowflake account. It includes your organization name and region information. |
| Snowflake User | The username used to connect to Snowflake. |
| Snowflake Role | The name of the role (permission set) that defines what you can access in Snowflake. Access to databases and tables is controlled by roles. |
| Snowflake Warehouse | The name of the virtual warehouse (compute resource) used to execute queries. Processing capacity and availability are managed per warehouse. |
| Snowflake Private Key | The private key (Base64-encoded) used for authentication with Snowflake. This is a more secure authentication method used in place of a password. |
How to Obtain Each Value
Snowflake Account
Click your username in the bottom-left corner of the screen to open your personal settings. The value shown in the "Account" field is your Snowflake Account.

Snowflake User
Similarly, when you open personal settings, the name displayed at the very top is your Snowflake User.
Snowflake Role
Similarly, the value shown in the "Switch Role" field is your Snowflake Role.
Snowflake Warehouse
Open "Compute" → "Warehouses" from the left sidebar menu. The values in the "NAME" column in the list are your Snowflake Warehouse names.
Snowflake Private Key
Follow the steps below to create a private key and register it with Squadbase.
Prerequisites
- OpenSSL must be installed
- You must have Snowflake administrator privileges (or OWNERSHIP privileges for the user)
Generate a Private Key
Open a terminal and run the following command.
Generate an unencrypted private key (recommended: simple setup):
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocryptGenerate a passphrase-encrypted private key (more secure):
openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out rsa_key.p8If you choose the encrypted version, you will be prompted to enter a passphrase during command execution. Store the passphrase in a safe place.
If successful, a rsa_key.p8 file will be created with the following format:
-----BEGIN PRIVATE KEY-----
MIIE6T...
-----END PRIVATE KEY-----Generate a Public Key
Generate a public key from the private key you created.
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pubIf successful, a rsa_key.pub file will be created:
-----BEGIN PUBLIC KEY-----
MIIBIj...
-----END PUBLIC KEY-----Assign the Public Key to a Snowflake User
Run the following SQL in a Snowflake worksheet or SnowSQL to assign the public key to the target user.
ALTER USER <username> SET RSA_PUBLIC_KEY='<public key content>';For the public key content, paste only the string between -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- from the rsa_key.pub file (do not include the header/footer lines).
Example:
ALTER USER my_user SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';Setting the public key requires OWNERSHIP privileges or MODIFY PROGRAMMATIC AUTHENTICATION METHODS privileges on the target user.