Amazon Redshift

Amazon Redshift is a fully managed, reliable data warehouse service in the cloud that offers large-scale storage and analysis of data set and performs large-scale database migrations. It is a part of the larger cloud-computing platform Amazon Web Services (AWS).

Hevo can load data from any of your Pipelines into an Amazon Redshift data warehouse. You can set up the Redshift Destination on the fly, as part of the Pipeline creation process, or independently. The ingested data is first staged in Hevo’s S3 bucket before it is batched and loaded to the Amazon Redshift Destination.

Prerequisites


Whitelist Hevo’s IP Addresses

You need to whitelist the Hevo IP address for your region to enable Hevo to connect to your Amazon RDS MySQL database.

To do this:

  1. Log in to the Amazon Redshift dashboard.

  2. In the left navigation pane, click Clusters.

  3. Click the Cluster that you want to connect to Hevo.

    Click Cluster

  4. In the Configuration tab, click the link text under Cluster Properties, VPC security groups to open the Security Groups panel.

    Click Security group ID

  5. In the Security Groups panel, click Inbound, and then, click Edit.

    Click Edit

  6. In the Edit inbound rules dialog box:

    Edit inbound rules

    1. Click Add Rule.

    2. In the Type column, select Redshift from the drop-down.

    3. In the Port Range column, enter the port of your Amazon Redshift cluster. The default value is 5439.

    4. In the Source column, select Custom from the drop-down and enter Hevo’s IP addresses for your region.

    5. Click Save.

  7. In the Security Groups panel, click Outbound, and then, click Edit.

  8. Repeat Step 6 in the Outbound Rules tab to configure outbound rules.


Create a User and Grant Privileges

1. Create a user (optional)

In order to create a user, you must be a superuser or a user with CREATE privilege.

To create a user, log in to your Amazon Redshift database and enter the following commands:

CREATE USER hevo WITH PASSWORD '<password>';

2. Grant privileges to the user

The database user specified in the Hevo Pipeline must have the SELECT and CREATE privileges.

To assign this privilege, log in to your Amazon Redshift database as a superuser and enter the following commands:

  1. Grant CREATE privilege to the database user for an existing database:

    GRANT CREATE ON DATABASE <database_name> TO hevo;
    
  2. Grant SELECT privilege to all tables or specific tables:

    GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO hevo; #all tables
    GRANT SELECT ON TABLE <schema_name>.<table_name> TO hevo; #specific table
    

Retrieve the Hostname and Port Number (Optional)

  1. Log in to the Amazon Redshift dashboard.

  2. In the left navigation pane, click Clusters.

  3. Click the Cluster that you want to connect to Hevo.

    Click Cluster

  4. Under Cluster Database Properties, locate the JDBC URL and the Port.

    The default Amazon Redshift port is 5439.

    Use this JDBC URL as the database host and the Port as the database port in Hevo while creating your Pipeline.

    Locate hostname


Configure Amazon Redshift as a Destination

Perform the following steps to configure Amazon Redshift as a Destination in Hevo:

  1. Click DESTINATIONS in the Asset Palette.

  2. Click + CREATE in the Destinations List View.

  3. In the Add Destination page, select Amazon Redshift.

  4. In the Configure your Amazon Redshift Destination page, specify the following:

    Test & continue

    • Destination Name: A unique name for this Destination.

    • Database Host: Amazon Redshift host’s IP address or DNS.

    • Database Port: The port on which your Amazon Redshift server is listening for connections (default is 5439).

    • Database User: A user with a non-administrative role of the Redshift database.

    • Database Password: Password of the user.

    • Database Name: Name of the Destination database where data will be dumped.

    • Database Schema: Name of the Destination database schema. Default is public.

    • Additional Settings:

      • Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel. Read Connecting Through SSH. Else, whitelist Hevo’s IP addresses for your region.

        Note: While whitelisting Hevo’s IP addresses, you must also make the Amazon instance publicly accessible.

      • Sanitize Table/Column Names?: Enable this option to remove all non-alphanumeric characters, spaces in between the table and column names and replace them with an underscore (_). Read Name Sanitization.

    • Advanced Settings:

      • Populate Loaded Timestamp: Enable this option to append the __hevo_loaded_at column to the Destination table to indicate the time when the Event was loaded to the Destination. See Loading Data to a Data Warehouse for more information.
  5. Click Test Connection to test connectivity with the Amazon Redshift warehouse.

  6. Once the test is successful, click SAVE DESTINATION.


Limitations

  • Hevo replicates a maximum of 4096 columns to each Amazon Redshift table. Read Limits on the Number of Columns.

  • Hevo does not support writing to tables that have identity columns.

    Let us suppose you create a table with the default Identity column and manually map a Source table to it. When the Pipeline runs, Hevo would issue insert queries to write all the values from the Source table to this table. However, the writes would fail, since Amazon Redshift does not permit writing values to the identity column.


See Also


Revision History

Refer to the following table for the list of key updates made to the page:

Date Release No. Description of Change
22-Feb-2021 NA - Added the limitation that Hevo does not support writing to tables that have identity columns.
- Updated the page overview to state that the Pipeline stages the ingested data in Hevo’s S3 bucket, from where it is finally loaded to the Destination.
- Revised the procedural sections to include detailed steps for configuring the Amazon Redshift Destination.
Last updated on 27 Feb 2021