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.

53 lines
2.1KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/jdbc.r
  3. \docType{methods}
  4. \name{dbConnect,AthenaDriver-method}
  5. \alias{dbConnect,AthenaDriver-method}
  6. \title{AthenaJDBC}
  7. \usage{
  8. \S4method{dbConnect}{AthenaDriver}(drv,
  9. provider = "com.simba.athena.amazonaws.auth.DefaultAWSCredentialsProviderChain",
  10. region = "us-east-1",
  11. s3_staging_dir = Sys.getenv("AWS_S3_STAGING_DIR"),
  12. schema_name = "default", fetch_size = 1000L,
  13. max_error_retries = 10, connection_timeout = 10000,
  14. socket_timeout = 10000, log_path = "", log_level = 0, ...)
  15. }
  16. \arguments{
  17. \item{drv}{driver}
  18. \item{provider}{JDBC auth provider (ideally leave default)}
  19. \item{region}{AWS region the Athena tables are in}
  20. \item{s3_staging_dir}{A write-able bucket on S3 that you have permissions for}
  21. \item{schema_name}{LOL if only this actually worked with Amazon's hacked Presto driver}
  22. \item{fetch_size}{Athena results fetch size}
  23. \item{max_error_retries, connection_timeout, socket_timeout}{technical connection info that you should only muck with if you know what you're doing.}
  24. \item{log_path, log_level}{The Athena JDBC driver can (shockingly) provide a decent bit
  25. of data in logs. Set this to a temporary directory or something log4j can use. For
  26. `log_level` use the names ("INFO", "DEBUG", "WARN", "ERROR", "ALL", "OFF", "FATAL", "TRACE") or
  27. their corresponding integer values 0-6.}
  28. \item{...}{passed on to the driver. See Details.}
  29. }
  30. \description{
  31. Connect to Athena
  32. }
  33. \section{Driver Configuration Options}{
  34. - `BinaryColumnLength`: <int> The maximum data length for `BINARY` columns. Default `32767L`
  35. - `ComplexTypeColumnLength`: <int> The maximum data length for `ARRAY`, `MAP`, and `STRUCT` columns. Default `65535L`
  36. - `StringColumnLength`: <int> The maximum data length for `STRING` columns. Default `255L`
  37. }
  38. \references{
  39. [Connect with JDBC](https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html);
  40. [Simba Athena JDBC Driver with SQL Connector Installation and Configuration Guide](https://s3.amazonaws.com/athena-downloads/drivers/JDBC/SimbaAthenaJDBC_2.0.6/docs/Simba+Athena+JDBC+Driver+Install+and+Configuration+Guide.pdf)
  41. }