Learn R Programming

RAthena (version 2.6.1)

dbClearResult: Clear Results

Description

Frees all resources (local and Athena) associated with result set. It does this by removing query output in AWS S3 Bucket, stopping query execution if still running and removed the connection resource locally.

Usage

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

Value

dbClearResult() returns TRUE, invisibly.

Arguments

res

An object inheriting from DBIResult.

...

Other arguments passed on to methods.

See Also

Examples

Run this code
if (FALSE) {
# 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())

res <- dbSendQuery(con, "show databases")
dbClearResult(res)

# Check if connection if valid after closing connection
dbDisconnect(con)
}

Run the code above in your browser using DataLab