Learn R Programming

RAthena (version 2.3.0)

dbGetStatement: Get the statement associated with a result set

Description

Returns the statement that was passed to [dbSendQuery()] or [dbSendStatement()].

Usage

# S4 method for AthenaResult
dbGetStatement(res, ...)

Arguments

res

An object inheriting from '>DBIResult.

...

Other arguments passed on to methods.

Value

dbGetStatement() returns a character.

See Also

dbGetStatement

Examples

Run this code
# NOT RUN {
# Note: 
# - Require AWS Account to run below example.
# - Different connection methods can be used please see `RAthena::dbConnect` documnentation

library(DBI)

# Demo connection to Athena using profile name 
con <- dbConnect(RAthena::athena())

rs <- dbSendQuery(con, "SHOW TABLES in default")
dbGetStatement(rs)
# }

Run the code above in your browser using DataLab