| 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.
hostDatabase host address.
portConnection port number.
userUser name used to authenticate.
passwordDatabase password.
dbnameDatabase name.
new()Instantiate a new MyRedshift object.
MyRedshift$new(host = NA, port = NA, user = NA, password = NA, dbname = NA)
hostDatabase host address.
portConnection port number.
userUser name used to authenticate.
passwordDatabase password.
dbnameDatabase 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_nameTable name.
nrowNumber 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)
sqlA character string containing SQL.
nrowNumber 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.