ClearBrain can automatically connect to your user data in Amazon Redshift. 

You can both import user data from your Redshift tables, or export ClearBrain predictive scores back into your Redshift database. 

Note: Redshift Connections are an Enterprise feature of ClearBrain. Please contact support@clearbrain.com if you would like to import your user data from Redshift to ClearBrain. 

Step 1: Create a Redshift User for ClearBrain

To connect to your Redshift data, you will need to create a user for ClearBrain in your Amazon Redshift.

Enter the commands below into your SQL client, with a unique username and password that ClearBrain can use to access your user data in Redshift.

CREATE USER {CLEARBRAIN_USER_NAME} WITH
PASSWORD '{SOME_SECURE_PASSWORD}';

Step 2: Grant Read access to Redshift User

Once you've created a Redshift user for ClearBrain, you will need to grant it read access to the specific tables in Redshift you would like to sync. 

To do so, please run the following commands in your SQL client.

GRANT SELECT ON ALL TABLES IN SCHEMA {YOUR_SCHEMA_NAME} TO {CLEARBRAIN_USER_NAME}; /* permission to read */

GRANT USAGE ON SCHEMA {YOUR_SCHEMA_NAME} TO {CLEARBRAIN_USER_NAME}; /* permission to read */

Note, {YOUR_SCHEMA_NAME} refers to the schema-folder in which your user data is stored in Redshift, and {CLEARBRAIN_USER_NAME} should be the user you created in Step 1.

Step 3: Create a Redshift Connection in ClearBrain

Next, you'll enter the Redshift credentials you created in Steps 1 & 2 into the ClearBrain platform. 

In the ClearBrain app, go to the Connections Tab, and click the "New Connection" button. Choose the Redshift option, and a list of form fields will appear:

  • Connection Name: Give your connection a unique name; this is the name the connection will display with in ClearBrain
  • Username: The name of the Redshift user you created in Step 1
  • Password: The password for the Redshift user you created in Step 1
  • Database: The database name of the Redshift cluster you would like to connect
  • Host: The host URL path of the Redshift database you would like to connect
  • Port: The port number of the Redshift database you would like to connect

Once entered, select the "Add Schemas/Tables" button to proceed to the last step.

Step 4: Specify which Redshift Tables to Import

Once you've entered the respective Redshift credentials, the final step is to specify which tables you would like us to access in your database. 

Enter the table name and the respective schema it belongs (if specified) in the form fields provided. These should match the tables you granted access to in Step 2.

Once completed, click "Create Connection" and you'll be all set! ClearBrain will unload data from the specified Redshift tables every Sunday PM PST.

(Optional): Grant Write access to Redshift User

If you would like to export predictions back into your Redshift database, please run the following commands in your SQL client when creating the Redshift user.

GRANT CREATE ON DATABASE {YOUR_DATABASE_NAME} TO {CLEARBRAIN_USER_NAME}; /* permission to write predictions */

Note, {CLEARBRAIN_USER_NAME} should be the user you created in Step 1, and {YOUR_DATABASE_NAME} should be the name of the Redshift database you would like ClearBrain to export predictions back to.

Did this answer your question?