DreamFactory Snowflake Database Service
This code is governed by a commercial license. To use it, you must follow refer to the LICENSE file.
To connect your Snowflake database to Dreamfactory, you will need to specify:
- Hostname An optional hostname that can be used as an alternative to the snowflake default hostname.
- Account
Account is the hostname + region information.
You can just copy it from your snowflake database URL:
- Username Username that you use to login to your snowflake account or any other user with access to the database.
- Password Password for your snowflake account (only if not using key pair authentication).
- Database Name of the database you want to connect to.
- Warehouse Name of the warehouse your database uses.
- Schema (optional) Schema of the database, PUBLIC by default.
DreamFactory supports Snowflake's key pair authentication method, which can be more secure than password-based authentication. To use key pair authentication:
-
Generate a key pair for Snowflake authentication:
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
-
In Snowflake, assign the public key to your user:
ALTER USER <username> SET RSA_PUBLIC_KEY='<public_key_data>';
Replace
<public_key_data>
with the contents of your public key (rsa_key.pub), ensuring all line breaks are removed. -
In DreamFactory:
- Specify your Snowflake account, username, and other connection details
- Leave the password field blank
- Upload your private key file (rsa_key.p8) in the "Private Key File" field
- If your private key is encrypted, enter the passphrase in the "Private Key Passphrase" field
For more information about Snowflake key pair authentication, see the official Snowflake documentation.