Connect GX Cloud to Redshift
Prerequisites
-
A Redshift database, schema, and table.
-
If you are using a fully-hosted deployment of GX Cloud, your Redshift cluster or workgroup must be publicly accessible.
-
A Redshift user with the following permissions:
-
USAGE
privileges on the schema. -
SELECT
privileges on the table.
-
-
Optional. To improve data security, GX recommends creating a separate Redshift user for your GX Cloud connection.
Optional. Create a separate Redshift user
Run all queries in the Amazon Redshift query editor v2.
-
Create a new role.
Redshift query editor v2CREATE ROLE gx_role;
-
Create a new user.
Redshift query editor v2CREATE USER gx_user PASSWORD 'your_password';
-
Grant the new role schema
USAGE
and tableSELECT
permissions.Redshift query editor v2GRANT USAGE ON SCHEMA your_schema TO ROLE gx_role;
GRANT SELECT ON ALL TABLES IN SCHEMA your_schema TO ROLE gx_role; -
Optional. Grant the new role access to future tables in the schema.
Redshift query editor v2ALTER DEFAULT PRIVILEGES IN SCHEMA your_schema
GRANT SELECT ON TABLES TO ROLE gx_role; -
Grant the new user the new role.
Redshift query editor v2GRANT ROLE gx_role TO gx_user;
Connect to a Redshift Data Source and add a Data Asset
-
In GX Cloud, click Data Assets > New Data Asset > New Data Source > Redshift.
-
Enter a meaningful name for the Data Source in the Data Source name field.
-
Select whether you will enter your connection details as either separate Input parameters or a consolidated Connection string.
-
Supply your connection details depending on the method you chose in the previous step. If you created a separate Redshift user for your GX Cloud connection as recommended above, use those credentials in your connection details.
-
If you chose Input parameters, complete the following fields:
-
Username: Enter the username you use to access Redshift.
-
Password: Enter the password you use to access Redshift.
-
Host: Enter the host of your Redshift database. The location of this information in Redshift depends on whether you are using a provisioned cluster or Redshift serverless.
- If you're using a provisioned cluster, go to the Provisioned clusters dashboard, select your Cluster, and find the Endpoint. Copy the endpoint up to the
:
. The host has a format ofcluster-name.abc123.us-east-2.redshift.amazonaws.com
. - If you're using Redshift serverless, go to the Serverless dashboard, select your Workgroup, and find the Endpoint. Copy the endpoint up to the
:
. The host has a format ofworkgroup-name.123.us-east-2.redshift-serverless.amazonaws.com
.
- If you're using a provisioned cluster, go to the Provisioned clusters dashboard, select your Cluster, and find the Endpoint. Copy the endpoint up to the
-
Port: Enter the port of your Redshift database. The location of this information in Redshift depends on whether you are using a provisioned cluster or Redshift serverless.
- If you're using a provisioned cluster, go to the Provisioned clusters dashboard, select your Cluster, and find the Endpoint. Copy the number after the
:
. This is usually the default of5439
. - If you're using Redshift serverless, go to the Serverless dashboard, select your Workgroup, and find the Endpoint. Copy the number after the
:
. This is usually the default of5439
.
- If you're using a provisioned cluster, go to the Provisioned clusters dashboard, select your Cluster, and find the Endpoint. Copy the number after the
-
Database: Enter the name of the Redshift database where the data you want to validate is stored.
-
SSL mode: Select how to handle encryption for client connections and server certificate verification. We recommend selecting
require
since GX Cloud supports SSL connections. See Redshift's SSL docs for more information on the available options.
-
-
If you chose Connection string, enter it with a format of:
Redshift connection stringredshift+psycopg2://<USER>:<PASSWORD>@<HOST>:<PORT>/<DATABASE>?sslmode=<SSLMODE>
For guidance on replacing each placeholder in the connection string, see the above input parameter definitions.
-
-
Click Connect.
-
Select one or more tables to import as Data Assets.
-
Click Add x Asset(s).
-
Decide which common data quality issues you want to start monitoring. By default, GX Cloud adds Expectations to detect Schema, Volume, and Completeness issues. You can de-select recommendations you'd like to opt out of.
-
Click Start monitoring or Finish.