- 14 Jun 2022
- 2 Minutes to read
Preparing your Redshift Data Warehouse
- Updated on 14 Jun 2022
- 2 Minutes to read
To connect to Redshift as a Working with Data Warehouses, some configuration is needed in AWS. This page explains how to configure Redshift settings to enable you to connect.
In the most basic configuration, there are three areas you must configure:
- Database Schemas and Users
- Security Groups
- Redshift Settings
Configuring Database Schemas and Users
Materialized views created with the Data Warehouse exist as tables in the sisense_views schema. Before connecting to the database, you need to create this schema and the database users with the commands below. Note that the “alter default privileges” commands are only necessary if you want Sisense to have access to new tables that may be created in the future.
Create the Schema
CREATE SCHEMA sisense_views;
Set up the Read User
CREATE USER <sisense_read> PASSWORD '<password>';
GRANT USAGE ON SCHEMA sisense_views TO <sisense_read>;
GRANT SELECT ON ALL TABLES IN SCHEMA sisense_views TO <sisense_read>;
Set up the Materialization User
CREATE USER <sisense_write> PASSWORD '<password>';
GRANT USAGE ON SCHEMA sisense_views TO <sisense_write> WITH GRANT OPTION;
GRANT CREATE ON SCHEMA sisense_views TO <sisense_write>;
Grant Access to Read Additional Schemas
GRANT USAGE ON SCHEMA <schema> TO <sisense_read>;
GRANT USAGE ON SCHEMA <schema> TO <sisense_write>;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema> TO <sisense_read>;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema> TO <sisense_write>;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema> GRANT SELECT ON tables TO <sisense_read>;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema> GRANT SELECT ON tables TO <sisense_write>;
Configuring a Security Group
Create a security group in the same VPC as the Redshift cluster that you are connecting to Sisense. You can create a security group in Services > VPC > Security > Security Groups.
After you create it, add inbound rules to allow traffic from Sisense Cloud as well as the Sisense deployment over the Redshift port (default 5439). The Sisense Cloud IP address is 18.104.22.168 and 22.214.171.124 and the Sisense deployment address will be the IP Address of your Sisense URL (for example, hypothetical Sisense deployment at https://analytics.example.com might have an IP address of 126.96.36.199).
Configuring Redshift Cluster
Find your cluster in the Amazon Redshift > Clusters menu and navigate to the Properties tab.
Edit the Network and security settings to attach the new security group to the Redshift cluster.
Then, ensure that Publicly accessible is set to Yes. Note, this setting has its own Edit button within the Network and security section.
Once that is done, the endpoint needed to connect can be found in the Connection Details section on the right side of the Properties page.
For more on Data Warehouses, see Working with Data Warehouses.