R Studio on Redshift
  • 26 Jul 2021
  • 1 Minute to read
  • Dark
    Light
  • PDF

R Studio on Redshift

  • Dark
    Light
  • PDF

Article summary

Panoply on Redshift

To connect your Panoply data warehouse to R:

  1. Install the RPostgreSQL package. You can do this in your R environment by running the following:

     install.packages("RPostgreSQL")
     library(RPostgreSQL)
    
  2. Set up the connection to your Panoply data warehouse:

     driver <- dbDriver("PostgreSQL")
     SampleConnection <- dbConnect(driver,
     host = 'db.panoply.io',
     port = '5439',
     user = '{your Panoply username}',
     password = '{your Panoply password}',
     dbname = '{the name of the Panoply DB containing your data}')
    
  3. Load your data into an R dataframe for analysis:

    SampleDF = dbReadTable(SampleConnection, '{table name}')


Was this article helpful?