Quellcode durchsuchen

beta-update

master
boB Rudis vor 2 Jahren
Ursprung
Commit
4597f96301
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 1D7529BE14E2BBA9
19 geänderte Dateien mit 439 neuen und 99 gelöschten Zeilen
  1. +1
    -0
      .Rbuildignore
  2. +1
    -0
      .bash_profile
  3. +25
    -0
      CONDUCT.md
  4. +10
    -5
      DESCRIPTION
  5. +5
    -0
      NAMESPACE
  6. +9
    -0
      NEWS.md
  7. +118
    -25
      R/jdbc.r
  8. +2
    -0
      R/metis-package.R
  9. +48
    -18
      README.Rmd
  10. +87
    -37
      README.md
  11. +20
    -1
      man/dbConnect-AthenaDriver-method.Rd
  12. +21
    -0
      man/dbExistsTable-AthenaConnection-character-method.Rd
  13. +9
    -1
      man/dbGetQuery-AthenaConnection-character-method.Rd
  14. +21
    -0
      man/dbListFields-AthenaConnection-character-method.Rd
  15. +21
    -0
      man/dbListTables-AthenaConnection-method.Rd
  16. +21
    -0
      man/dbReadTable-AthenaConnection-character-method.Rd
  17. +19
    -0
      man/dbSendQuery-AthenaConnection-character-method.Rd
  18. +0
    -12
      man/dbSendQuery-AthenaDriver-ANY-method.Rd
  19. +1
    -0
      man/metis.Rd

+ 1
- 0
.Rbuildignore Datei anzeigen

@@ -8,3 +8,4 @@
^\.codecov\.yml$
^README_files$
^doc$
^CONDUCT\.md$

+ 1
- 0
.bash_profile Datei anzeigen

@@ -0,0 +1 @@
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/RHome

+ 25
- 0
CONDUCT.md Datei anzeigen

@@ -0,0 +1,25 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments,
commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant
(http:contributor-covenant.org), version 1.0.0, available at
http://contributor-covenant.org/version/1/0/0/

+ 10
- 5
DESCRIPTION Datei anzeigen

@@ -1,11 +1,16 @@
Package: metis
Type: Package
Title: Helpers for Accessing and Querying Amazon Athena
Version: 0.1.0
Date: 2017-05-16
Author: Bob Rudis (bob@rud.is)
Version: 0.2.0
Date: 2018-03-19
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640"))
)
Maintainer: Bob Rudis <bob@rud.is>
Description: Helpers for Accessing and Querying Amazon Athena. Including a lightweight RJDBC shim.
Encoding: UTF-8
Description: Helpers for Accessing and Querying Amazon Athena. Including a
lightweight RJDBC shim.
URL: https://github.com/hrbrmstr/metis
BugReports: https://github.com/hrbrmstr/metis/issues
License: AGPL
@@ -19,4 +24,4 @@ Imports:
DBI,
dplyr,
aws.signature
RoxygenNote: 6.0.1
RoxygenNote: 6.0.1.9000

+ 5
- 0
NAMESPACE Datei anzeigen

@@ -8,10 +8,15 @@ exportClasses(AthenaConnection)
exportClasses(AthenaDriver)
exportClasses(AthenaResult)
exportMethods(dbConnect)
exportMethods(dbExistsTable)
exportMethods(dbGetQuery)
exportMethods(dbListFields)
exportMethods(dbListTables)
exportMethods(dbReadTable)
exportMethods(dbSendQuery)
import(DBI)
import(RJDBC)
import(dplyr)
importFrom(aws.signature,read_credentials)
importFrom(aws.signature,use_credentials)
importFrom(readr,type_convert)

+ 9
- 0
NEWS.md Datei anzeigen

@@ -1,3 +1,12 @@
0.2.0
=========

- Updated authentication provider to be `com.amazonaws.athena.jdbc.shaded.com.amazonaws.auth.DefaultAWSCredentialsProviderChain` (via @dabdine)
- Now supports additional DBI/RJDBC methods including: `dbExistsTable()`,
`dbListFields()`, `dbListTables()`, `dbReadTable()`
- More documentation
- Added code of conduct

0.1.0
=========


+ 118
- 25
R/jdbc.r Datei anzeigen

@@ -1,20 +1,38 @@
#' AthenaJDBC
#'
#' @export
setClass("AthenaDriver", representation("JDBCDriver", identifier.quote="character", jdrv="jobjRef"))
setClass(

"AthenaDriver",
representation("JDBCDriver", identifier.quote="character", jdrv="jobjRef")

)

#' AthenaJDBC
#'
#' @export
Athena <- function(identifier.quote='`') {

drv <- JDBC(driverClass="com.amazonaws.athena.jdbc.AthenaDriver",
system.file("AthenaJDBC41-1.1.0.jar", package="metis"),
identifier.quote=identifier.quote)

return(as(drv, "AthenaDriver"))

}

#' AthenaJDBC
#'
#' @param provider JDBC auth provider (ideally leave default)
#' @param region AWS region the Athena tables are in
#' @param s3_staging_dir A write-able bucket on S3 that you have permissions for
#' @param schema_name LOL if only this actually worked with Amazon's hacked Presto driver
#' @param max_error_retries,connection_timeout,socket_timeout,retry_base_delay,retry_max_backoff_time
#' technical connection info that you should only muck with if you know what you're doing.
#' @param log_path,log_level The Athena JDBC driver can (shockingly) provide a decent bit
#' of data in logs. Set this to a temporary directory or somethign log4j can use.
#' @param ... unused
#' @references <https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html>
#' @export
setMethod(

@@ -35,9 +53,9 @@ setMethod(
log_level,
...) {

conn_string = sprintf('jdbc:awsathena://athena.%s.amazonaws.com:443/%s', region, schema_name)
# if (!is.null(provider)) {
conn_string = sprintf(
'jdbc:awsathena://athena.%s.amazonaws.com:443/%s', region, schema_name
)

jc <- callNextMethod(drv, conn_string,
s3_staging_dir = s3_staging_dir,
@@ -52,24 +70,6 @@ setMethod(
aws_credentials_provider_class = provider,
...)

# } else {
#
# jc <- callNextMethod(drv, conn_string,
# schema_name = schema_name,
# max_error_retries = max_error_retries,
# connection_timeout = connection_timeout,
# socket_timeout = socket_timeout,
# retry_base_delay = retry_base_delay,
# retry_max_backoff_time = retry_max_backoff_time,
# s3_staging_dir = s3_staging_dir,
# schema_name = schema_name,
# log_path = log_path,
# log_level = log_level,
# user = Sys.getenv("AWS_ACCESS_KEY_ID"),
# password = Sys.getenv("AWS_SECRET_ACCESS_KEY"))
#
# }

return(as(jc, "AthenaConnection"))

}
@@ -88,11 +88,14 @@ setClass("AthenaResult", contains = "JDBCResult")

#' AthenaJDBC
#'
#' @param conn Athena connection
#' @param statement SQL statement
#' @param ... unused
#' @export
setMethod(

"dbSendQuery",
"AthenaDriver",
signature(conn="AthenaConnection", statement="character"),

def = function(conn, statement, ...) {
return(as(callNextMethod(), "AthenaResult"))
@@ -102,16 +105,106 @@ setMethod(

#' AthenaJDBC
#'
#' @param conn Athena connection
#' @param statement SQL statement
#' @param ... unused
#' @export
setMethod(

"dbGetQuery",
signature(conn="AthenaConnection", statement="character"),

def = function(conn, statement, ...) {
def = function(conn, statement, type_convert=FALSE, ...) {
r <- dbSendQuery(conn, statement, ...)
on.exit(.jcall(r@stat, "V", "close"))
dplyr::tbl_df(fetch(r, -1, block=1000))
res <- dplyr::tbl_df(fetch(r, -1, block=1000))
if (type_convert) res <- readr::type_convert(res)
res
}

)
#' AthenaJDBC
#'
#' @param conn Athena connection
#' @param pattern table name pattern
#' @param schema Athena schema name
#' @param ... unused
#' @export
setMethod(

"dbListTables",
signature(conn="AthenaConnection"),

def = function(conn, pattern='*', schema, ...) {

if (missing(pattern)) {
dbGetQuery(
conn, sprintf("SHOW TABLES IN %s", schema)
) -> x
} else {
dbGetQuery(
conn, sprintf("SHOW TABLES IN %s %s", schema, dbQuoteString(conn, pattern))
) -> x
}

x$tab_name
}

)

#' AthenaJDBC
#'
#' @param conn Athena connection
#' @param name table name
#' @param schema Athena schema name
#' @param ... unused
#' @export
setMethod(

"dbExistsTable",
signature(conn="AthenaConnection", name="character"),

def = function(conn, name, schema, ...) {
length(dbListTables(conn, schema=schema, pattern=name)) > 0
}

)

#' AthenaJDBC
#'
#' @param conn Athena connection
#' @param name table name
#' @param schema Athena schema name
#' @param ... unused
#' @export
setMethod(

"dbListFields",
signature(conn="AthenaConnection", name="character"),

def = function(conn, name, schema, ...) {
query <- sprintf("SELECT * FROM %s.%s LIMIT 1", schema, name)
res <- dbGetQuery(conn, query)
colnames(res)
}

)

#' AthenaJDBC
#'
#' @param conn Athena connection
#' @param name table name
#' @param schema Athena schema name
#' @param ... unused
#' @export
setMethod(

"dbReadTable",
signature(conn="AthenaConnection", name="character"),

def = function(conn, name, schema, ...) {
query <- sprintf("SELECT * FROM %s.%s LIMIT 1", schema, dbQuoteString(conn, name))
dbGetQuery(conn, query)
}

)

+ 2
- 0
R/metis-package.R Datei anzeigen

@@ -3,11 +3,13 @@
#' Including a lightweight RJDBC shim.
#'
#' @name metis
#' @encoding UTF-8
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @import RJDBC
#' @import DBI
#' @import dplyr
#' @importFrom readr type_convert
#' @importFrom aws.signature use_credentials read_credentials
NULL



+ 48
- 18
README.Rmd Datei anzeigen

@@ -1,38 +1,58 @@
---
output: rmarkdown::github_document
---
![](https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Winged_goddess_Louvre_F32.jpg/300px-Winged_goddess_Louvre_F32.jpg)

# `metis`

[`metis`](https://en.wikipedia.org/wiki/Metis_(mythology)) : Helpers for Accessing and Querying Amazon Athena
Helpers for Accessing and Querying Amazon Athena

Including a lightweight RJDBC shim.

![](https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Winged_goddess_Louvre_F32.jpg/300px-Winged_goddess_Louvre_F32.jpg)
In Greek mythology, Metis was Athena's "helper".

THIS IS SUPER ALPHA QUALITY. NOTHING TO SEE HERE. MOVE ALONG.
## Description

Still fairly beta-quality level but getting there.

The goal will be to get around enough of the "gotchas" that are preventing raw RJDBC Athena
connections from "just working" with `dplyr` v0.6.0+ and also get around the [`fetchSize` problem](https://www.reddit.com/r/aws/comments/6aq22b/fetchsize_limit/) without having to not use `dbGetQuery()`.

It will also support more than the vanilla id/secret auth mechism (it currently support the default basic auth and temp token auth, the latter via environment variables).

This package includes the `AthenaJDBC41-1.1.0.jar` JAR file out of convenience but that will likely move to a separate package as this gets closer to prime time.
The `AthenaJDBC41-1.1.0.jar` JAR file is included out of convenience but that will likely move to a separate package as this gets closer to prime time if this goes on CRAN.

See the **Usage** section for an example.

## What's Inside The Tin?

The following functions are implemented:

- `athena_connect`: Make a JDBC connection to Athena (this returns an `AthenaConnection` object which is a super-class of it's RJDBC vanilla counterpart)
- `read_credentials`: Use Credentials from .aws/credentials File
- `use_credentials`: Use Credentials from .aws/credentials File
- `Athena`: AthenaJDBC`
Easy-interface connection helper:

- `athena_connect` Make a JDBC connection to Athena

Custom JDBC Classes:

- `Athena`: AthenaJDBC (make a new Athena con obj)
- `AthenaConnection-class`: AthenaJDBC
- `AthenaDriver-class`: AthenaJDBC
- `AthenaResult-class`: AthenaJDBC

Custom JDBC Class Methods:

- `dbConnect-method`: AthenaJDBC
- `dbExistsTable-method`: AthenaJDBC
- `dbGetQuery-method`: AthenaJDBC
- `dbListFields-method`: AthenaJDBC
- `dbListTables-method`: AthenaJDBC
- `dbReadTable-method`: AthenaJDBC
- `dbSendQuery-method`: AthenaJDBC

### Installation
Pulled in from other `cloudyr` pkgs:

- `read_credentials` Use Credentials from .aws/credentials File
- `use_credentials` Use Credentials from .aws/credentials File

## Installation

```{r eval=FALSE}
devtools::install_github("hrbrmstr/metis")
@@ -42,7 +62,7 @@ devtools::install_github("hrbrmstr/metis")
options(width=120)
```

### Usage
## Usage

```{r message=FALSE, warning=FALSE, error=FALSE}
library(metis)
@@ -53,16 +73,26 @@ packageVersion("metis")
```

```{r message=FALSE, warning=FALSE, error=FALSE}
use_credentials("personal")
use_credentials("default")

ath <- athena_connect(default_schema = "sampledb",
s3_staging_dir = "s3://accessible-bucket",
log_path = "/tmp/athena.log",
log_level = "DEBUG")
athena_connect(
default_schema = "sampledb",
s3_staging_dir = "s3://accessible-bucket",
log_path = "/tmp/athena.log",
log_level = "DEBUG"
) -> ath

dbListTables(ath)
dbListTables(ath, schema="sampledb")

dbExistsTable(ath, "elb_logs", schema="sampledb")

dbListFields(ath, "elb_logs", "sampledb")

dbGetQuery(ath, "SELECT * FROM sampledb.elb_logs LIMIT 10") %>%
type_convert() %>%
glimpse()
```

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

+ 87
- 37
README.md Datei anzeigen

@@ -1,40 +1,67 @@

[`metis`](https://en.wikipedia.org/wiki/Metis_(mythology)) : Helpers for Accessing and Querying Amazon Athena
![](https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Winged_goddess_Louvre_F32.jpg/300px-Winged_goddess_Louvre_F32.jpg)

# `metis`

Helpers for Accessing and Querying Amazon Athena

Including a lightweight RJDBC shim.

![](https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Winged_goddess_Louvre_F32.jpg/300px-Winged_goddess_Louvre_F32.jpg)
In Greek mythology, Metis was Athena’s “helper”.

THIS IS SUPER ALPHA QUALITY. NOTHING TO SEE HERE. MOVE ALONG.
## Description

The goal will be to get around enough of the "gotchas" that are preventing raw RJDBC Athena connecitons from "just working" with `dplyr` v0.6.0+ and also get around the [`fetchSize` problem](https://www.reddit.com/r/aws/comments/6aq22b/fetchsize_limit/) without having to not use `dbGetQuery()`.
Still fairly beta-quality level but getting there.

It will also support more than the vanilla id/secret auth mechism (it currently support the default basic auth and temp token auth, the latter via environment variables).
The goal will be to get around enough of the “gotchas” that are
preventing raw RJDBC Athena connections from “just working” with `dplyr`
v0.6.0+ and also get around the [`fetchSize`
problem](https://www.reddit.com/r/aws/comments/6aq22b/fetchsize_limit/)
without having to not use `dbGetQuery()`.

This package includes the `AthenaJDBC41-1.1.0.jar` JAR file out of convenience but that will likely move to a separate package as this gets closer to prime time.
The `AthenaJDBC41-1.1.0.jar` JAR file is included out of convenience but
that will likely move to a separate package as this gets closer to prime
time if this goes on CRAN.

See the **Usage** section for an example.

## What’s Inside The Tin?

The following functions are implemented:

- `athena_connect`: Make a JDBC connection to Athena (this returns an `AthenaConnection` object which is a super-class of it's RJDBC vanilla counterpart)
- `read_credentials`: Use Credentials from .aws/credentials File
- `use_credentials`: Use Credentials from .aws/credentials File
- `Athena`: AthenaJDBC\`
- `AthenaConnection-class`: AthenaJDBC
- `AthenaDriver-class`: AthenaJDBC
- `AthenaResult-class`: AthenaJDBC
- `dbConnect-method`: AthenaJDBC
- `dbGetQuery-method`: AthenaJDBC
- `dbSendQuery-method`: AthenaJDBC
Easy-interface connection helper:

- `athena_connect` Make a JDBC connection to Athena

Custom JDBC Classes:

- `Athena`: AthenaJDBC (make a new Athena con obj)
- `AthenaConnection-class`: AthenaJDBC
- `AthenaDriver-class`: AthenaJDBC
- `AthenaResult-class`: AthenaJDBC

Custom JDBC Class Methods:

- `dbConnect-method`: AthenaJDBC
- `dbExistsTable-method`: AthenaJDBC
- `dbGetQuery-method`: AthenaJDBC
- `dbListFields-method`: AthenaJDBC
- `dbListTables-method`: AthenaJDBC
- `dbReadTable-method`: AthenaJDBC
- `dbSendQuery-method`: AthenaJDBC

Pulled in from other `cloudyr` pkgs:

### Installation
- `read_credentials` Use Credentials from .aws/credentials File
- `use_credentials` Use Credentials from .aws/credentials File

## Installation

``` r
devtools::install_github("hrbrmstr/metis")
```

### Usage
## Usage

``` r
library(metis)
@@ -44,22 +71,39 @@ library(tidyverse)
packageVersion("metis")
```

## [1] '0.1.0'
## [1] '0.2.0'

``` r
use_credentials("personal")
use_credentials("default")

ath <- athena_connect(default_schema = "sampledb",
s3_staging_dir = "s3://accessible-bucket",
log_path = "/tmp/athena.log",
log_level = "DEBUG")
athena_connect(
default_schema = "sampledb",
s3_staging_dir = "s3://accessible-bucket",
log_path = "/tmp/athena.log",
log_level = "DEBUG"
) -> ath

dbListTables(ath)
dbListTables(ath, schema="sampledb")
```

## [1] "elb_logs"

``` r
dbExistsTable(ath, "elb_logs", schema="sampledb")
```

## [1] TRUE

``` r
dbListFields(ath, "elb_logs", "sampledb")
```

## [1] "timestamp" "elbname" "requestip" "requestport"
## [5] "backendip" "backendport" "requestprocessingtime" "backendprocessingtime"
## [9] "clientresponsetime" "elbresponsecode" "backendresponsecode" "receivedbytes"
## [13] "sentbytes" "requestverb" "url" "protocol"

``` r
dbGetQuery(ath, "SELECT * FROM sampledb.elb_logs LIMIT 10") %>%
type_convert() %>%
glimpse()
@@ -67,19 +111,25 @@ dbGetQuery(ath, "SELECT * FROM sampledb.elb_logs LIMIT 10") %>%

## Observations: 10
## Variables: 16
## $ timestamp <dttm> 2014-09-26 23:00:27, 2014-09-26 23:00:40, 2014-09-26 23:00:57, 2014-09-26 23:01:10, ...
## $ timestamp <dttm> 2014-09-30 01:03:00, 2014-09-30 01:03:01, 2014-09-30 01:03:01, 2014-09-30 01:03:01, ...
## $ elbname <chr> "lb-demo", "lb-demo", "lb-demo", "lb-demo", "lb-demo", "lb-demo", "lb-demo", "lb-demo...
## $ requestip <chr> "250.244.91.129", "245.151.134.252", "250.144.139.199", "242.201.196.167", "253.206.1...
## $ requestport <dbl> 30339, 30339, 30339, 30339, 30339, 30339, 30339, 30339, 30339, 30339
## $ backendip <chr> "249.70.230.218", "240.86.17.179", "240.204.230.249", "254.88.26.13", "245.227.117.51...
## $ backendport <dbl> 8000, 80, 8888, 8899, 8888, 8888, 8888, 8888, 8888, 8888
## $ requestprocessingtime <dbl> 0.000082, 0.000093, 0.000094, 0.000101, 0.000092, 0.000091, 0.000093, 0.000089, 0.000...
## $ backendprocessingtime <dbl> 0.047690, 0.047722, 0.039022, 0.046465, 0.046841, 0.042139, 0.040092, 0.048087, 0.039...
## $ clientresponsetime <dbl> 7.2e-05, 5.1e-05, 6.4e-05, 6.4e-05, 4.9e-05, 4.7e-05, 5.1e-05, 7.4e-05, 5.4e-05, 5.4e-05
## $ elbresponsecode <int> 200, 200, 200, 200, 200, 200, 200, 200, 200, 200
## $ backendresponsecode <int> 200, 200, 404, 400, 500, 200, 200, 200, 200, 200
## $ requestip <chr> "253.90.22.60", "253.51.141.83", "245.59.222.144", "241.35.85.250", "246.245.70.48", ...
## $ requestport <dbl> 4095, 14668, 29796, 38607, 32750, 10182, 64948, 51279, 13331, 2700
## $ backendip <chr> "250.133.18.39", "248.214.120.18", "250.38.70.52", "249.45.101.192", "249.28.120.9", ...
## $ backendport <dbl> 8888, 443, 8899, 8888, 8888, 8888, 8888, 8888, 8888, 8000
## $ requestprocessingtime <dbl> 7.3e-05, 8.9e-05, 4.5e-05, 4.3e-05, 7.6e-05, 7.3e-05, 7.7e-05, 4.6e-05, 4.9e-05, 5.3e-05
## $ backendprocessingtime <dbl> 0.561864, 0.021517, 0.019530, 0.018937, 0.022727, 0.390384, 0.017017, 0.016437, 0.019...
## $ clientresponsetime <dbl> 9.0e-05, 7.0e-05, 3.0e-05, 3.3e-05, 3.2e-05, 8.4e-05, 5.2e-05, 7.1e-05, 6.9e-05, 5.4e-05
## $ elbresponsecode <int> 200, 304, 304, 304, 200, 200, 304, 304, 200, 304
## $ backendresponsecode <int> 200, 200, 403, 200, 200, 400, 200, 200, 200, 200
## $ receivedbytes <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
## $ sentbytes <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
## $ sentbytes <dbl> 58402, 0, 0, 0, 152213, 58402, 0, 0, 152213, 0
## $ requestverb <chr> "GET", "GET", "GET", "GET", "GET", "GET", "GET", "GET", "GET", "GET"
## $ url <chr> "http://www.abcxyz.com:80/jobbrowser/?format=json&state=running&user=15llx5s", "http:...
## $ url <chr> "http://www.abcxyz.com:80/", "http://www.abcxyz.com:80/static/css/hue3.css", "http://...
## $ protocol <chr> "HTTP/1.1", "HTTP/1.1", "HTTP/1.1", "HTTP/1.1", "HTTP/1.1", "HTTP/1.1", "HTTP/1.1", "...

## Code of Conduct

Please note that this project is released with a [Contributor Code of
Conduct](CONDUCT.md). By participating in this project you agree to
abide by its terms.

+ 20
- 1
man/dbConnect-AthenaDriver-method.Rd Datei anzeigen

@@ -6,13 +6,32 @@
\title{AthenaJDBC}
\usage{
\S4method{dbConnect}{AthenaDriver}(drv,
provider = "com.amazonaws.athena.jdbc.shaded.com.amazonaws.auth.EnvironmentVariableCredentialsProvider",
provider = "com.amazonaws.athena.jdbc.shaded.com.amazonaws.auth.DefaultAWSCredentialsProviderChain",
region = "us-east-1", s3_staging_dir = Sys.getenv("AWS_S3_STAGING_DIR"),
schema_name = "default", max_error_retries = 10,
connection_timeout = 10000, socket_timeout = 10000,
retry_base_delay = 100, retry_max_backoff_time = 1000, log_path,
log_level, ...)
}
\arguments{
\item{provider}{JDBC auth provider (ideally leave default)}

\item{region}{AWS region the Athena tables are in}

\item{s3_staging_dir}{A write-able bucket on S3 that you have permissions for}

\item{schema_name}{LOL if only this actually worked with Amazon's hacked Presto driver}

\item{max_error_retries, connection_timeout, socket_timeout, retry_base_delay, retry_max_backoff_time}{technical connection info that you should only muck with if you know what you're doing.}

\item{log_path, log_level}{The Athena JDBC driver can (shockingly) provide a decent bit
of data in logs. Set this to a temporary directory or somethign log4j can use.}

\item{...}{unused}
}
\description{
AthenaJDBC
}
\references{
<https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html>
}

+ 21
- 0
man/dbExistsTable-AthenaConnection-character-method.Rd Datei anzeigen

@@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbExistsTable,AthenaConnection,character-method}
\alias{dbExistsTable,AthenaConnection,character-method}
\title{AthenaJDBC}
\usage{
\S4method{dbExistsTable}{AthenaConnection,character}(conn, name, schema, ...)
}
\arguments{
\item{conn}{Athena connection}

\item{name}{table name}

\item{schema}{Athena schema name}

\item{...}{unused}
}
\description{
AthenaJDBC
}

+ 9
- 1
man/dbGetQuery-AthenaConnection-character-method.Rd Datei anzeigen

@@ -5,7 +5,15 @@
\alias{dbGetQuery,AthenaConnection,character-method}
\title{AthenaJDBC}
\usage{
\S4method{dbGetQuery}{AthenaConnection,character}(conn, statement, ...)
\S4method{dbGetQuery}{AthenaConnection,character}(conn, statement,
type_convert = FALSE, ...)
}
\arguments{
\item{conn}{Athena connection}

\item{statement}{SQL statement}

\item{...}{unused}
}
\description{
AthenaJDBC


+ 21
- 0
man/dbListFields-AthenaConnection-character-method.Rd Datei anzeigen

@@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbListFields,AthenaConnection,character-method}
\alias{dbListFields,AthenaConnection,character-method}
\title{AthenaJDBC}
\usage{
\S4method{dbListFields}{AthenaConnection,character}(conn, name, schema, ...)
}
\arguments{
\item{conn}{Athena connection}

\item{name}{table name}

\item{schema}{Athena schema name}

\item{...}{unused}
}
\description{
AthenaJDBC
}

+ 21
- 0
man/dbListTables-AthenaConnection-method.Rd Datei anzeigen

@@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbListTables,AthenaConnection-method}
\alias{dbListTables,AthenaConnection-method}
\title{AthenaJDBC}
\usage{
\S4method{dbListTables}{AthenaConnection}(conn, pattern = "\%", schema, ...)
}
\arguments{
\item{conn}{Athena connection}

\item{pattern}{table name pattern}

\item{schema}{Athena schema name}

\item{...}{unused}
}
\description{
AthenaJDBC
}

+ 21
- 0
man/dbReadTable-AthenaConnection-character-method.Rd Datei anzeigen

@@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbReadTable,AthenaConnection,character-method}
\alias{dbReadTable,AthenaConnection,character-method}
\title{AthenaJDBC}
\usage{
\S4method{dbReadTable}{AthenaConnection,character}(conn, name, schema, ...)
}
\arguments{
\item{conn}{Athena connection}

\item{name}{table name}

\item{schema}{Athena schema name}

\item{...}{unused}
}
\description{
AthenaJDBC
}

+ 19
- 0
man/dbSendQuery-AthenaConnection-character-method.Rd Datei anzeigen

@@ -0,0 +1,19 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbSendQuery,AthenaConnection,character-method}
\alias{dbSendQuery,AthenaConnection,character-method}
\title{AthenaJDBC}
\usage{
\S4method{dbSendQuery}{AthenaConnection,character}(conn, statement, ...)
}
\arguments{
\item{conn}{Athena connection}

\item{statement}{SQL statement}

\item{...}{unused}
}
\description{
AthenaJDBC
}

+ 0
- 12
man/dbSendQuery-AthenaDriver-ANY-method.Rd Datei anzeigen

@@ -1,12 +0,0 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbSendQuery,AthenaDriver,ANY-method}
\alias{dbSendQuery,AthenaDriver,ANY-method}
\title{AthenaJDBC}
\usage{
\S4method{dbSendQuery}{AthenaDriver,ANY}(conn, statement, ...)
}
\description{
AthenaJDBC
}

+ 1
- 0
man/metis.Rd Datei anzeigen

@@ -1,6 +1,7 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metis-package.R
\docType{package}
\encoding{UTF-8}
\name{metis}
\alias{metis}
\alias{metis-package}


Laden…
Abbrechen
Speichern