Skip to main content

Connecting Your Data Warehouse

Supported Data Warehouses#

Select your data warehouse:

If none of these are your preferred data warehouse or data base destination please make a request and we will get right on it!

Snowflake#

The following inputs are required to connect a Snowflake data warehouse.

Add IAM User

Creating a user and permissions#

To build with FloSQL you can create a user with the necessary permissions using the following setup script. Please note that the flosql_password must be updated:

SET flosql_password = 'CHANGE_THIS';
USE ROLE sysadmin;
CREATE WAREHOUSE IF NOT EXISTS flosql_warehouse WITH AUTO_SUSPEND=60 WAREHOUSE_SIZE = 'XSMALL' AUTO_RESUME = TRUE;CREATE DATABASE IF NOT EXISTS flosql_database;CREATE SCHEMA IF NOT EXISTS flosql_database.ingest;
CREATE FILE FORMAT IF NOT EXISTS flosql_database.ingest.file_ingest_csvTYPE = 'CSV' ESCAPE='\\' FIELD_OPTIONALLY_ENCLOSED_BY='"';
USE ROLE securityadmin;
CREATE ROLE IF NOT EXISTS flosql_role;GRANT ROLE flosql_role TO ROLE SYSADMIN;CREATE USER IF NOT EXISTS flosql PASSWORD=$flosql_password DEFAULT_ROLE=flosql_role DEFAULT_WAREHOUSE=flosql_warehouse;GRANT ROLE flosql_role TO USER flosql;
GRANT USAGE ON WAREHOUSE flosql_warehouse TO ROLE flosql_role;GRANT USAGE, CREATE SCHEMA, MONITOR ON DATABASE flosql_database TO ROLE flosql_role;GRANT USAGE ON SCHEMA flosql_database.ingest TO ROLE flosql_role;
GRANT USAGE ON FILE FORMAT flosql_database.ingest.file_ingest_csv TO ROLE flosql_role;

Account#

Is what comes before snowflakecomputing.com in the URL when you sign into Snowflake directly. Add IAM User Add IAM User

Database#

Click the Databases tab and select the database name you will be using. If using the setup script above enter flosql_database.

Add IAM User

Username#

Enter the username you use to log in with. If using the setup script above enter flosql_user.

Password#

Enter the password for the username you use to log in with. If using the setup script above enter the password you set.

Add IAM User

Role#

Select the appropriate role of the user provided. If using the setup script provided above, use flosql_role.

Warehouse#

Click the Warehouses tab and select the warehouse name you will be using. If using the setup script above enter flosql_warehouse.

Add IAM User

Redshift/Postgres#

The following inputs are required to connect a Redshift data warehouse or Postgres data base.

Add IAM User

Hostname#

Enter the hostname of your database server.

Port#

Use the default 5439, or enter the port used by your server.

Database#

Enter the name of your database.

Username#

Enter the username.

Password#

Enter the password associated with the username.

BigQuery#

The following inputs are required to connect a Google BigQuery data warehouse.

Step 1: Go to your Google Cloud Console's project list and add the following:

  • Project Name
  • Database Name

Step 2: Set up the Service Account JSON

Follow Google's service key instructions to create a service account key in JSON format for your service account. Copy and paste the service account key in the Service Account JSON box. The service account key should have the following format:

{  "type": "service_account",  "project_id": "random-project-12345",  "private_key_id": "abcdefg",  "private_key": "*****",  "client_email": "name@project.iam.gserviceaccount.com",  "client_id": "12345678",  "auth_uri": "https://accounts.google.com/o/oauth2/auth",  "token_uri": "https://oauth2.googleapis.com/token",  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/name%40project.iam.gserviceaccount.com"}