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.

28 lines
730 B

context("Driver & queries work")
drv <- metis::Athena()
expect_is(drv, "AthenaDriver")
drv = drv,
schema_name = "sampledb",
provider = "com.simba.athena.amazonaws.auth.PropertiesFileCredentialsProvider",
AwsCredentialsProviderArguments = path.expand("~/.aws/athenaCredentials.props"),
s3_staging_dir = "s3://aws-athena-query-results-569593279821-us-east-1",
) -> con
expect_is(con, "AthenaConnection")
expect_equal(dbListTables(con, schema="sampledb"), "elb_logs")
expect_true(dbExistsTable(con, "elb_logs", schema="sampledb"))
expect_true("url" %in% dbListFields(con, "elb_logs", "sampledb"))
dbGetQuery(con, "SELECT * FROM sampledb.elb_logs LIMIT 10"),