Description Usage Arguments Details Value Examples
Function to establish JDBC driven connection to AWS Redshift DBMS. Credentials and cluster information required. Communication with Redshift DB, which runs on a modified PostgreSQL dialect, can require special Redshift PostgreSQL code.
1 2 |
yrurl |
A character string of the URL to the cluster of the DBMS. Paste only the following part of the URL to function input: yrurl = "<JDBCURL>:<port>/<dbname>?user=<user>&". If yrurl is supplied, ConnectRS requires no further arguments as inputs. |
host |
A character string of the host |
dbname |
A character string of the DB name |
user |
A character string of the username |
driverClass |
A character string of with the Class of the JDBC Driver. Check AWS Documentation for up to date driver class and adjust following link if necessary "com.amazon.redshift.jdbc42.Driver". If new driver class 43 is available enter e.g.: "com.amazon.redshift.jdbc43.Driver" |
classPath |
A character string of the path to the folder containing the JDBC-Driver (a .jar file) |
identifier.quote |
Optional argument; NA by default; can impact
functions as e.g.
|
Either provide: yrurl OR all other arguments. Connection to DB not visible in RStudio connection pane. Disconnect by using e.g. dbDisconnect
For details on the JDBC cluster URL see: AWS Documentation
Returns a connection object which can be used to query
the AWS Redshift DBMS with e.g.: dbGetQuery
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
Not generally executable examples:
con <- ConnectRS(yrurl = "jdbc:redshift://redshift.adsbexchange.com:5439/adsbx?user=random.user&")
(when the url is given)
where:
<JDBCURL> <- jdbc:redshift://redshift.adsbexchange.com
<port> <- 5439
<dbname> <- adsbx
user=<user> <- random.user
Password retrieved via popo-up
dbDisconnect(con)
con <- ConnectRS(host = "redshift.adsbexchange.com", dbname = "adsbx",
user = "random.user", driverClass = "com.amazon.redshift.jdbc42.Driver",
classPath = "C:/.../JDBC/RedshiftJDBC42-1.2.15.1025.jar", identifier.quote = "`")
Password retrieved via popo-up
dbDisconnect(con)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.