| dbGetQuery | R Documentation |
Send query, retrieve results and then clear result set
## S4 method for signature 'AthenaConnection,character'
dbGetQuery(conn, statement, statistics = FALSE, unload = athena_unload(), ...)
conn |
A DBIConnection object, as returned by
|
statement |
a character string containing SQL. |
statistics |
If set to |
unload |
boolean input to modify 'statement' to align with AWS Athena UNLOAD,
default is set to |
... |
Other parameters passed on to methods. |
dbGetQuery() returns a dataframe.
If the user does not have permission to remove AWS S3 resource from AWS Athena output location, then an AWS warning will be returned.
For example AccessDenied (HTTP 403). Access Denied.
It is better use query caching or optionally prevent clear AWS S3 resource using noctua_options
so that the warning doesn't repeatedly show.
dbGetQuery
## 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())
# Sending Queries to Athena
dbGetQuery(con, "show databases")
# Disconnect conenction
dbDisconnect(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.