View source: R/driver-redshift.R
redshift | R Documentation |
Connect to Redshift clusters via ODBC.
In particular, the custom dbConnect()
method for Redshift ODBC drivers
automatically determines whether IAM-based credentials are available, much
like other AWS SDKs and tools. This requires the paws.common package.
redshift()
## S4 method for signature 'RedshiftOdbcDriver'
dbConnect(
drv,
clusterId,
server,
database,
region = NULL,
driver = NULL,
uid = NULL,
pwd = NULL,
dbUser = uid,
...
)
drv |
An object that inherits from DBI::DBIDriver, or an existing DBI::DBIConnection object (in order to clone an existing connection). |
clusterId |
The Redshift cluster identifier. Only one of |
server |
The full hostname of the Redshift cluster. |
database |
The name of the Redshift database to connect to. |
region |
The AWS region the Redshift cluster runs in. Ignored when
|
driver |
The name of or path to a Redshift ODBC driver, or |
uid , pwd |
Disable IAM credentials and manually specify a username and password for authentication. |
dbUser |
The Redshift database account. |
... |
Further arguments passed on to |
An OdbcConnection
object with an active connection to a Redshift
cluster or SQL warehouse.
## Not run:
# Connect to Redshift using IAM credentials.
DBI::dbConnect(
odbc::redshift(),
clusterId = "my-testing-cluster",
database = "dev",
dbUser = "me"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.