ConnectRSdplyr: Setup Connection for querying AWS Redshift with dplyr

Description Usage Arguments Value Examples

Description

Function to establish PostgreSQL driven connection to AWS Redshift DBMS. Communication with DB via this channel requires only dplyr verbs, no PostgreSQL code is required.

Usage

1
ConnectRSdplyr(host, user, dbname, port = 5439)

Arguments

host

A character string for the DB host

user

A character string for the Username

dbname

A character string for the Name of the DB

port

Port is set to 5439 (class(port): "numeric") by default. This is the default TCP port for AWS Redshift DBMS.

Value

Returns a "Formal Class PQConnection" object which can be used to e.g. query the AWS Redshift DBMS with help of the dplyr, more specifically the dbplyr package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: Not generally executable examples:
Connecting to PostgreSQL AWS Redshift database hosted by
"redshift.adsbexchange.com" for user "erikseumegoettingen",
with database name "adsbx". Enter password in pop-up.

con <- ConnectRSdplyr(host = 'redshift.adsbexchange.com',
user = 'erikseumegoettingen', dbname = 'adsbx')

dbDisconnect(con)
dbIsValid(con) # confirms that connection is closed by returning FALSE
## End(Not run)

RichandFamous/adsb-R-project documentation built on May 5, 2019, 3:53 p.m.