Skip to content

Commit

Permalink
added documentation around dbClearResult behaviour when user doesn't …
Browse files Browse the repository at this point in the history
…have permission to delete aws s3 objects #96
  • Loading branch information
DyfanJones committed Jun 16, 2020
1 parent 501b979 commit c157b1b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
## Breaking Change
* Fixed issue where `noctua` would return a `data.frame` for utility `SQL` queries regardless of backend file parser. This is due to `AWS Athena` outputting `SQL UTILITY` queries as a text file that required to be read in line by line. Now `noctua` will return the correct data format based on file parser set in `noctua_options` for example: `noctua_options("vroom")` will return `tibbles`.

## Documentation:
* Added documentation to highlight behavour `dbClearResult` when user doesn't have permission to delete AWS S3 objects (#96)

# noctua 1.7.0
## New Feature
* functions that collect or push to AWS S3 now have a retry capability. Meaning if API call fails then the call is retried (#79)
Expand Down
2 changes: 2 additions & 0 deletions R/Connection.R
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ setMethod(

#' Send query, retrieve results and then clear result set
#'
#' @note If the user does not have permission to remove AWS S3 resource from AWS Athena output location, then an AWS warning will be returned.
#' It is better use query caching \code{\link{noctua_options}} so that the warning doesn't repeatly show.
#' @name dbGetQuery
#' @inheritParams DBI::dbGetQuery
#' @param statistics If set to \code{TRUE} will print out AWS Athena statistics of query.
Expand Down
6 changes: 4 additions & 2 deletions R/Result.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ setClass(
#'
#' 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.
#'
#' @note If a user does not have permission to remove AWS S3 resource from AWS Athena output location, then an AWS warning will be returned.
#' It is better use query caching \code{\link{noctua_options}} so that the warning doesn't repeatly show.
#' @name dbClearResult
#' @inheritParams DBI::dbClearResult
#' @return \code{dbClearResult()} returns \code{TRUE}, invisibly.
Expand Down Expand Up @@ -103,8 +106,7 @@ setMethod(
#' Currently returns the top n elements (rows) from result set or returns entire table from Athena.
#' @name dbFetch
#' @param n maximum number of records to retrieve per fetch. Use \code{n = -1} or \code{n = Inf} to retrieve all pending records.
#' Some implementations may recognize other special values. Currently chunk sizes range from 0 to 999,
#' if entire dataframe is required use \code{n = -1} or \code{n = Inf}.
#' Some implementations may recognize other special values. If entire dataframe is required use \code{n = -1} or \code{n = Inf}.
#' @inheritParams DBI::dbFetch
#' @return \code{dbFetch()} returns a data frame.
#' @seealso \code{\link[DBI]{dbFetch}}
Expand Down
4 changes: 4 additions & 0 deletions man/dbClearResult.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/dbFetch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/dbGetQuery.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c157b1b

Please sign in to comment.