dbFetch {noctua} | R Documentation |
Fetch records from previously executed query
Description
Currently returns the top n elements (rows) from result set or returns entire table from Athena.
Usage
## S4 method for signature 'AthenaResult'
dbFetch(res, n = -1, ...)
Arguments
res |
An object inheriting from DBIResult, created by
|
n |
maximum number of records to retrieve per fetch. Use |
... |
Other arguments passed on to methods. |
Value
dbFetch()
returns a data frame.
See Also
Examples
## Not run:
# Note:
# - Require AWS Account to run below example.
# - Different connection methods can be used please see `noctua::dbConnect` documnentation
library(DBI)
# Demo connection to Athena using profile name
con <- dbConnect(noctua::athena())
res <- dbSendQuery(con, "show databases")
dbFetch(res)
dbClearResult(res)
# Disconnect from Athena
dbDisconnect(con)
## End(Not run)
[Package noctua version 2.6.2 Index]