RStudio

Amazon Redshift

Availability

This translation is available in the development version of dbplyr

devtools::install_github("tidyverse/dbplyr")

Driver Options

Please refer to the official page from Amazon AWS for instructions on how to download and setup the driver: Configure an ODBC Connection

Package Options

The odbc package, in combination with a driver, provides DBI support and an ODBC connection.

Connection Settings

There are five settings needed to make a connection:

  • Driver - See the Drivers section for setup information
  • servername - A network path to the database server
  • database - The name of the schema
  • UID - The user’s network ID or server local account
  • PWD - The account’s password
  • Port - Should be set to 5439
con <- DBI::dbConnect(odbc::odbc(),
                      Driver       = "[your driver's name]",
                      servername   = "[your server's path]",
                      database     = "[your database's name]",
                      UID          = rstudioapi::askForPassword("Database user"),
                      PWD          = rstudioapi::askForPassword("Database password"),
                      Port         = 5439)