Access and Query Amazon Athena via DBI/JDBC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.1 KiB

7 years ago
#' Helpers for Accessing and Querying Amazon Athena
#'
6 years ago
#' Methods are provides to connect to 'Amazon' 'Athena', lookup schemas/tables,
#' perform queries and retrieve query results. A lightweight 'RJDBC' implementation
#' is included along with an interface to the 'AWS' command-line utility.
7 years ago
#'
5 years ago
#' @name metis.lite
5 years ago
#'
#' @section IMPORTANT:
#'
#' Since R 3.5 (I don't remember this happening in R 3.4.x) signals sent from interrupting
#' Athena JDBC calls crash the R #' interpreter. You need to set the `-Xrs` option to avoid
#' signals being passed on to the JVM owner. That has to be done _#' before_ `rJava` is
#' loaded so you either need to remember to put it at the top of all scripts _or_ stick this
#' in your local #' `~/.Rprofile` and/or sitewide `Rprofile`:
#'
#'
5 years ago
#' @section IMPORTANT:
#'
5 years ago
#' Since R 3.5 (I don't remember this happening in R 3.4.x) signals sent from interrupting
5 years ago
#' Athena JDBC calls crash the R #' interpreter. You need to set the `-Xrs` option to avoid
5 years ago
#' signals being passed on to the JVM owner. That has to be done _#' before_ `rJava` is
5 years ago
#' loaded so you either need to remember to put it at the top of all scripts _or_ stick this
#' in your local #' `~/.Rprofile` and/or sitewide `Rprofile`:
#'
#'
#' if (!grepl("-Xrs", getOption("java.parameters", ""))) {
#' options(
5 years ago
#' "java.parameters" = c(getOption("java.parameters", default = NULL), "-Xrs")
5 years ago
#' )
#' }
#'
6 years ago
#' @encoding UTF-8
7 years ago
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @import RJDBC
5 years ago
#' @keywords internal
7 years ago
#' @import DBI
#' @import dplyr
6 years ago
#' @importFrom jsonlite fromJSON
6 years ago
#' @importFrom readr type_convert
6 years ago
#' @importFrom uuid UUIDgenerate
#' @importFrom sys exec_internal
#' @importFrom aws.signature use_credentials read_credentials
NULL
#' Use Credentials from .aws/credentials File
#'
#' @md
#' @references [aws.signature::use_credentials()] / [aws.signature::read_credentials()]
#' @name use_credentials
#' @rdname use_credentials
#' @inheritParams aws.signature::use_credentials
#' @export
NULL
#' @name read_credentials
#' @rdname use_credentials
#' @export
7 years ago
NULL