Learn R Programming

redshift (version 0.5)

redshift.connect: Connect to Redshift Cluster

Description

Creates an RJDBC connection to the Redshift cluster.

Usage

redshift.connect(jdbcUrl, username, password, custom_driver = "default")

Arguments

jdbcUrl
The JDBC URL as specified in the Amazon AWS Management Console
username
The username to authenticate with
password
The password to authenticate with
custom_driver
Option to point to a custom PostgreSQL driver JAR. Class name must be "org.postgresql.Driver"

Value

RJDBC connection object

Examples

Run this code
require(redshift)

## connect to our cluster
#conn <- redshift.connect("jdbc:postgresql://blah.blah.eu-west-1.redshift.amazonaws.com:5439/data", "username", "password")

#conn <- redshift.connect("jdbc:postgresql://blah.blah.eu-west-1.redshift.amazonaws.com:5439/data", "username", "password","/home/myuser/psql/postgresql-9.2-1003.jdbc3.jar")

Run the code above in your browser using DataLab