Amazon Redshift

This article describes how to create a connection to Amazon Redshift using a SQL command.

An Amazon Redshift connection is used to support exporting/loading data from your Upsolver tables into Redshift.

Syntax

CREATE REDSHIFT CONNECTION  
    <connection_identifier> 
    CONNECTION_STRING = '<connection_string>' 
    USER_NAME = '<user_name>'
    PASSWORD = '<password>' 
    [ MAX_CONCURRENT_CONNECTIONS = <integer> ]
    [ COMMENT = '<comment>' ]

Jump to

Connection options

CONNECTION_STRING — editable

Type: text

The connection string to use when connecting to the database. The string can be copied directly from Redshift.

An IAM can be added to the connection string, allowing you to connect to Redshift without using a password. More information regarding IAM can be found here.

USER_NAME — editable

Type: text

The user to authenticate to the DB with.

PASSWORD — editable

Type: text

The password to use for authentication. Optional when using IAM-based authentication (please see CONNECTION_STRING).

MAX_CONCURRENT_CONNECTIONS — editable

Type: integer

(Optional) The maximum number of concurrent connections to the DB.

Limiting this may reduce the load on the database but could result in longer data latency.

COMMENT — editable

Type: text

(Optional) A description or comment regarding this connection.

Minimum example

CREATE REDSHIFT CONNECTION redshift_connection
    CONNECTION_STRING = 'jdbc:redshift://<host_name>:5439/<database_name>'
    USER_NAME = 'your username'
    PASSWORD = 'your password'

Full example

CREATE REDSHIFT CONNECTION redshift_connection
    CONNECTION_STRING = 'jdbc:redshift://<host_name>:5439/<database_name>'
    USER_NAME = 'your username'
    PASSWORD = 'your password'
    MAX_CONCURRENT_CONNECTIONS = 10
    COMMENT = 'My new Redshift connection';

Last updated