MyRedshift | R Documentation |
This class can be used to interact with a Redshift database. Currently, only read operations— such as reading tables and query results from Redshift into R— are supported.
host
Database host address.
port
Connection port number.
user
User name used to authenticate.
password
Database password.
dbname
Database name.
new()
Instantiate a new MyRedshift
object.
MyRedshift$new(host = NA, port = NA, user = NA, password = NA, dbname = NA)
host
Database host address.
port
Connection port number.
user
User name used to authenticate.
password
Database password.
dbname
Database name.
A new MyRedshift
object.
read_tbl()
A method for reading a table into a DataFrame. Warning: Reading large tables
all at once may lead to memory issues. If the argument nrow
is omitted, the
entire table will be fetched. A value of Inf
for the nrow
argument is
supported and also returns the full result. If more rows than available are
fetched (by passing a value for nrow
that is too large), the result is
returned in full without warning. If zero rows are requested, the columns of
the data frame are still fully typed. Fetching fewer rows than available is
permitted, no warning is issued.
MyRedshift$read_tbl(table_name, nrow = -1L)
table_name
Table name.
nrow
Number of rows to be fetched.
A DataFrame representing a table in the database.
read_sql()
A method for reading query results into a DataFrame. Warning: Large results may lead
to memory issues. If the argument nrow
is omitted, the rows will be returned. A value
of Inf
for the nrow
argument is supported and also returns the full result. If more
rows than available are fetched (by passing a value for nrow
that is too large), the
result is returned in full without warning. If zero rows are requested, the columns of
the data frame are still fully typed. Fetching fewer rows than available is permitted,
no warning is issued.
MyRedshift$read_sql(sql, nrow = -1L)
sql
A character string containing SQL.
nrow
Number of rows to be fetched.
A DataFrame representing query results.
finalizer()
Resource cleanup.
MyRedshift$finalizer()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.