aws_db_redshift_con: Get a database connection to Amazon Redshift

View source: R/database-redshift.R

aws_db_redshift_conR Documentation

Get a database connection to Amazon Redshift

Description

Get a database connection to Amazon Redshift

Usage

aws_db_redshift_con(
  user,
  pwd,
  id = NULL,
  host = NULL,
  port = NULL,
  dbname = NULL,
  ...
)

Arguments

user, pwd, host, port, dbname, ...

named parameters passed on to DBI::dbConnect. Note that the user and pwd are for your AWS IAM account; and the same as those you used to create the cluster with aws_db_redshift_create()

id

(character) Cluster identifier. If you supply id, we'll fetch host, port, and dbname. If id is not supplied. you have to supply host, port, and dbname. Refer to this parameter definition in aws_db_redshift_create() for more details.

Details

The connection returned is created using RPostgres

You can manage Redshift programatically via paws::redshift

Value

an object of class RedshiftConnection

See Also

Other database: aws_db_cluster_status(), aws_db_instance_status(), aws_db_rds_con(), aws_db_rds_create(), aws_db_rds_list(), aws_db_redshift_create()

Examples

## Not run: 
library(DBI)
library(RPostgres)

con_rshift <- aws_db_redshift_con("<define all params here>")
con_rshift
library(RPostgres)
dbListTables(con_rshift)
dbWriteTable(con_rshift, "mtcars", mtcars)
dbListTables(con_rshift)

library(dplyr)
tbl(con_rshift, "mtcars")

## End(Not run)

sixtyfour documentation built on April 3, 2025, 8:22 p.m.