Loading Data from Amazon Redshift

This section describes how you can connect Amazon Redshift with Exasol and then load data. To view details about data type mappings or to migrate data, see the Amazon Redshift to Exasol migration script, in our GitHub repository.

Download Driver

Download the compatible JDBC 4.2 driver from the AWS Documentation link.

Configure the Driver in EXAoperation

Do the following to configure the driver in EXAoperation:

  1. Log in to EXAoperation user interface as an Administrator user.
  2. Select Configuration > Software and click the JDBC Drivers tab.
  3. Click Add to add the JDBC driver details.
  4. Enter the following details for the JDBC properties:
    • Driver Name: Redshift
    • Main Class: com.amazon.redshift.jdbc42.Driver
    • Prefix: jdbc:redshift:
    • Disable Security Manager: Check the box to disable the security manager. This allows the JDBC Driver to access certificate and additional information.
    • Comment: This is an optional field.
  5. Click Add to save the settings.
  6. Select the radio button next to the driver from list of JDBC driver.
  7. Click Choose File to locate the downloaded driver and click Upload to upload the JDBC driver.

Run Statement

Exasol recommends you create a connection string.

CREATE CONNECTION jdbc_connection_1
TO 'jdbc:redshift://example_cluster123.some_region.redshift.amazonaws.com:5439/dev' 
USER 'awsuser' 
IDENTIFIED BY'some_password';

Run the following statement to check the connection.

import from jdbc at 'jdbc_connection_1' statement 'select 42';

Load Data

You can use the IMPORT statement to load data using the connection you created above. IMPORT supports loading data from a table or a SQL statement.

Possible Errors and Solutions

Error Message 1

[ETL-5] JDBC-Client-Error: Connecting to 'jdbc:redshift://example_cluster123.some_region.redshift.amazonaws.com:5439/dev' as user='awsuser' failed: [Amazon](500150) Error setting/closing connection: Error loading the keystore . (Session: 1622834984232180908)

Solution

Ensure that you have selected the Disable Security Manager in EXAoperation as mentioned in Configure the Driver in EXAoperation.

Error Message 2

[ETL-5] JDBC-Client-Error: Connecting to 'jdbc:redshift://example_cluster123.some_region.redshift.amazonaws.com:5439/dev' as user='awsuser' failed: [Amazon](500150) Error setting/closing connection: Connection timed out. (Session: 1622834984232180908)

Solution

Check Security Groups on Redshift side to allow your VM / Cluster to connect to Redshift.

Error Message 3

[ETL-5] JDBC-Client-Error: Connecting to 'jdbc:redshift://example_cluster123.some_region.redshift.amazonaws.com:5439/dev' as user='awsuser' failed: [Amazon](500150) Error setting/closing connection: UnknownHostException. (Session: 1622834984232180908)

Solution

Insert DNS Server through EXAoperation.

Error Message 4

[ETL-5] JDBC-Client-Error: Connecting to 'jdbc:redshift://example_cluster123.some_region.redshift.amazonaws.com:5439/dev' as user='awsuser' failed: SSL error: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed

Solution

Add ;ssl=false to the connection string, for example:

jdbc:redshift://example_cluster123.some_region.redshift.amazonaws.com:5439/dev;ssl=false