dbClearResult: Clear Results

Description Usage Arguments Value See Also Examples

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

1
2
## S4 method for signature 'AthenaResult'
dbClearResult(res, ...)

Arguments

res

An object inheriting from DBIResult.

...

Other arguments passed on to methods.

Value

dbClearResult() returns TRUE, invisibly.

See Also

dbIsValid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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")
dbClearResult(res)

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

DyfanJones/noctua documentation built on Jan. 23, 2020, 3:37 a.m.