Access and Query Amazon Athena via DBI/JDBC
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

48 lines
1.5KB

  1. #' Helpers for Accessing and Querying Amazon Athena
  2. #'
  3. #' Methods are provides to connect to 'Amazon' 'Athena', lookup schemas/tables,
  4. #' perform queries and retrieve query results. A lightweight 'RJDBC' implementation
  5. #' is included along with an interface to the 'AWS' command-line utility.
  6. #'
  7. #' @name metis.lite
  8. #'
  9. #' @section IMPORTANT:
  10. #'
  11. #' Since R 3.5 (I don't remember this happening in R 3.4.x) signals sent from interrupting
  12. #' Athena JDBC calls crash the R #' interpreter. You need to set the `-Xrs` option to avoid
  13. #' signals being passed on to the JVM owner. That has to be done _before_ `rJava` is
  14. #' loaded so you either need to remember to put it at the top of all scripts _or_ stick this
  15. #' in your local #' `~/.Rprofile` and/or sitewide `Rprofile`:
  16. #'
  17. #'
  18. #' if (!grepl("-Xrs", getOption("java.parameters", ""))) {
  19. #' options(
  20. #' "java.parameters" = c(getOption("java.parameters", default = NULL), "-Xrs")
  21. #' )
  22. #' }
  23. #'
  24. #' @md
  25. #' @encoding UTF-8
  26. #' @keywords internal
  27. #' @docType package
  28. #' @author Bob Rudis (bob@@rud.is)
  29. #' @import RJDBC DBI bit64 dbplyr
  30. NULL
  31. #' Use Credentials from .aws/credentials File
  32. #'
  33. #' @md
  34. #' @importFrom aws.signature use_credentials read_credentials
  35. #' @references [aws.signature::use_credentials()] / [aws.signature::read_credentials()]
  36. #' @name use_credentials
  37. #' @rdname use_credentials
  38. #' @inheritParams aws.signature::use_credentials
  39. #' @export
  40. NULL
  41. #' @name read_credentials
  42. #' @rdname use_credentials
  43. #' @export
  44. NULL