Browse Source

JDBC interface

master
boB Rudis 6 years ago
parent
commit
1db9f5185f
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 20
      .Rbuildignore
  2. 6
      .gitignore
  3. 37
      .travis.yml
  4. 25
      CONDUCT.md
  5. 51
      DESCRIPTION
  6. 2
      LICENSE
  7. 56
      NAMESPACE
  8. 65
      NEWS.md
  9. 11
      R/aaa.r
  10. 425
      R/jdbc.r
  11. 68
      R/sergeant-caffeinated-package.R
  12. 21
      R/utils.r
  13. 3
      R/zzz.R
  14. 104
      README.Rmd
  15. 230
      README.md
  16. 0
      codecov.yml
  17. 34
      cran-comments.md
  18. 105
      docs/LICENSE.html
  19. 112
      docs/authors.html
  20. 571
      docs/index.html
  21. 9
      docs/jquery.sticky-kit.min.js
  22. 12
      docs/link.svg
  23. 210
      docs/news/index.html
  24. 158
      docs/pkgdown.css
  25. 8
      docs/pkgdown.js
  26. 127
      docs/reference/DrilDriver-class.html
  27. 143
      docs/reference/Drill.html
  28. 120
      docs/reference/DrillConnection-class.html
  29. 111
      docs/reference/DrillDriver-class.html
  30. 139
      docs/reference/DrillResult-class.html
  31. 131
      docs/reference/dbDataType-DrillConnection-method.html
  32. 128
      docs/reference/drill_active.html
  33. 132
      docs/reference/drill_cancel.html
  34. 143
      docs/reference/drill_connection.html
  35. 165
      docs/reference/drill_custom_functions.html
  36. 166
      docs/reference/drill_jdbc.html
  37. 128
      docs/reference/drill_metrics.html
  38. 138
      docs/reference/drill_options.html
  39. 132
      docs/reference/drill_profile.html
  40. 134
      docs/reference/drill_profiles.html
  41. 155
      docs/reference/drill_query.html
  42. 157
      docs/reference/drill_set.html
  43. 138
      docs/reference/drill_settings_reset.html
  44. 138
      docs/reference/drill_show_files.html
  45. 128
      docs/reference/drill_show_schemas.html
  46. 134
      docs/reference/drill_stats.html
  47. 134
      docs/reference/drill_status.html
  48. 138
      docs/reference/drill_storage.html
  49. 142
      docs/reference/drill_system_reset.html
  50. 134
      docs/reference/drill_threads.html
  51. 137
      docs/reference/drill_uplift.html
  52. 133
      docs/reference/drill_use.html
  53. 134
      docs/reference/drill_version.html
  54. 296
      docs/reference/index.html
  55. 113
      docs/reference/sergeant-exports.html
  56. 146
      docs/reference/sergeant.html
  57. 178
      docs/reference/src_drill.html
  58. 144
      docs/reference/src_tbls.html
  59. BIN
      inst/java/slf4j-nop-1.7.25.jar
  60. 18
      man/DrillJDBC.Rd
  61. 10
      man/DrillJDBCConnection-class.Rd
  62. 10
      man/DrillJDBCDriver-class.Rd
  63. 31
      man/dbConnect-DrillJDBCDriver-method.Rd
  64. 26
      man/dbDataType-DrillJDBCConnection-method.Rd
  65. 79
      man/drill_jdbc.Rd
  66. 40
      man/drill_jdbc_internals.Rd
  67. 12
      man/sergeant-caffeinated-exports.Rd
  68. 16
      man/sergeant-caffeinated.Rd
  69. 41
      man/sergeant.caffeinated.Rd
  70. 7
      sergeant-caffeinated.Rproj
  71. BIN
      sergeant.png
  72. 2
      tests/test-all.R
  73. 5
      tests/testthat.R
  74. 6
      tests/testthat/test-sergeant-caffeinated.R
  75. 17
      tests/testthat/test-sergeant.caffeinated.R

20
.Rbuildignore

@ -1,13 +1,13 @@
^.*\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^README-.*\.png$
^\.travis\.yml$
^README\.*Rmd$
^README\.*html$
^NOTES\.*Rmd$
^NOTES\.*html$
^\.codecov\.yml$
^README_files$
^doc$
^tmp$
^notes$
^\.gitlab-ci\.yml$
^CONDUCT\.md$
^sergeant.png$
^inst/jars$
^docs$
^codecov\.yml$
^apache-drill-1\.10\.0\.tar\.gz$
^cdh4-repository_1\.0_all\.deb$
^cran-comments\.md$

6
.gitignore

@ -1,8 +1,4 @@
.DS_Store
.Rproj.user
.Rhistory
.RData
.Rproj
src/*.o
src/*.so
src/*.dll
.DS_Store

37
.travis.yml

@ -1,6 +1,37 @@
language: R
sudo: false
language: r
warnings_are_errors: true
cache: packages
sudo: required
services:
- docker
jdk:
- oraclejdk8
addons:
apt:
packages:
- oracle-java8-set-default
before_install:
- docker pull drill/apache-drill:1.14.0
- docker run -i --name drill-1.14.0 -p 8047:8047 --detach -t drill/apache-drill:1.14.0 /bin/bash
- docker ps -a
before_script:
- sleep 5
after_success:
- Rscript -e 'covr::codecov()'
- Rscript -e 'covr::codecov()'
r:
- oldrel
- release
notifications:
email:
- bob@rud.is

25
CONDUCT.md

@ -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/

51
DESCRIPTION

@ -1,24 +1,35 @@
Package: sergeant-caffeinated
Type: Package
Title: sergeant-caffeinated title goes here otherwise CRAN checks fail
Version: 0.1.0
Date: 2018-10-14
Package: sergeant.caffeinated
Title: Tools to Transform and Query Data with 'Apache' 'Drill' ('JDBC')
Version: 0.7.0
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: A good description goes here otherwise CRAN checks fail.
URL: https://gitlab.com/hrbrmstr/sergeant-caffeinated
BugReports: https://gitlab.com/hrbrmstr/sergeant-caffeinated/issues
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640")),
person("Edward", "Visel", email = "edward.visel@gmail.com", role = "ctb"),
person("Andy", "Hine", email = "andyyhine@gmail.com", role = "ctb")
)
Description: 'Apache Drill' is a low-latency distributed query engine designed to enable
data exploration and 'analytics' on both relational and non-relational 'datastores',
scaling to petabytes of data. Methods are provided that enable working with 'Apache'
'Drill' instances via the 'JDBC' 'DBI' and 'dplyr'/'dbplyr' idioms.
Depends:
R (>= 3.1.2)
URL: https://github.com/hrbrmstr/sergeant-caffeinated
BugReports: https://github.com/hrbrmstr/sergeant-caffeinated/issues
License: MIT + file LICENSE
Encoding: UTF-8
License: AGPL
LazyData: true
Imports:
DBI (>= 0.7),
dplyr (>= 0.7.0),
dbplyr (>= 1.1.0),
htmltools (>= 0.3.6),
scales (>= 0.4.1),
RJDBC (>= 0.2-5),
utils,
methods,
magrittr
Suggests:
testthat,
covr
Depends:
R (>= 3.2.0)
Imports:
httr,
jsonlite
rJava (>= 0.9-8),
testthat (>= 1.0.2),
covr (>= 3.0.0)
RoxygenNote: 6.0.1.9000

2
LICENSE

@ -0,0 +1,2 @@
YEAR: 2016
COPYRIGHT HOLDER: Bob Rudis

56
NAMESPACE

@ -1,4 +1,56 @@
# Generated by roxygen2: do not edit by hand
import(httr)
importFrom(jsonlite,fromJSON)
S3method(db_data_type,DrillJDBCConnection)
S3method(db_data_type,tbl_drill_jdbc)
S3method(sql_escape_ident,DrillJDBCConnection)
S3method(sql_translate_env,DrillJDBCConnection)
S3method(src_tbls,src_dbi)
S3method(tbl,src_drill_jdbc)
export("%>%")
export(DrillJDBC)
export(drill_jdbc)
export(src_drill_jdbc)
export(tbl)
exportClasses(DrillJDBCConnection)
exportClasses(DrillJDBCDriver)
exportClasses(DrillJDBCResult)
exportMethods(dbConnect)
exportMethods(dbDataType)
exportMethods(dbSendQuery)
import(DBI)
import(methods)
import(utils)
importClassesFrom(RJDBC,JDBCConnection)
importClassesFrom(RJDBC,JDBCDriver)
importClassesFrom(RJDBC,JDBCResult)
importFrom(dbplyr,base_agg)
importFrom(dbplyr,base_scalar)
importFrom(dbplyr,base_win)
importFrom(dbplyr,build_sql)
importFrom(dbplyr,sql)
importFrom(dbplyr,sql_prefix)
importFrom(dbplyr,sql_quote)
importFrom(dbplyr,src_sql)
importFrom(dbplyr,tbl_sql)
importFrom(dbplyr,win_current_group)
importFrom(dbplyr,win_over)
importFrom(dbplyr,win_recycled)
importFrom(dplyr,"%>%")
importFrom(dplyr,bind_cols)
importFrom(dplyr,bind_rows)
importFrom(dplyr,copy_to)
importFrom(dplyr,data_frame)
importFrom(dplyr,db_data_type)
importFrom(dplyr,db_desc)
importFrom(dplyr,db_explain)
importFrom(dplyr,db_query_fields)
importFrom(dplyr,filter)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
importFrom(dplyr,sql_escape_ident)
importFrom(dplyr,sql_translate_env)
importFrom(dplyr,src)
importFrom(dplyr,src_tbls)
importFrom(dplyr,tbl)
importFrom(scales,comma)

65
NEWS.md

@ -1,2 +1,63 @@
0.1.0
* Initial release
# sergeant 0.6.0
- Authentication support for DBI/dplyr and `drill_connection()` pure REST interface
# sergeant 0.5.2
- Make rJava & RJDBC optional (WIP)
- Hack to remove ";" at end of queries sent to `drill_query()`
- Added `dbplyr` windows functions to `sql_translate_env`
# sergeant 0.4.0
- Getting ready for new `dplyr` (thx to Edward Visel)
- Cleaned up roxygen docs so that `src_drill` is exported now.
# sergeant 0.3.2
- Finally got quoting done. I thought I had before but I guess I hadn't.
- Added documnentation for built-in and custom Drill function that are supported.
# sergeant 0.3.1.9000
* fixed `src_drill()` example
* JDBC driver still in github repo but no longer included in pkg builds. See
README.md or `drill_jdbc()` help for more information on using the JDBC
driver with sergeant.
# sergeant 0.3.0.9000
* New DBI interface (to the REST API)
* dplyr interface now uses the DBI interace to the REST API
* CRAN checks pass besides size (removing JDBC driver in next dev iteration)
# sergeant 0.2.1.9000
* implemented a large subset of Drill SQL Functions <https://drill.apache.org/docs/about-sql-function-examples/>
# sergeant 0.2.0.9000
* experimental alpha dplyr driver
# sergeant 0.1.2.9000
* can pass RJDBC connections made with `drill_jdbc()` to `drill_query()`
* finally enaled `nodes` parameter to be a multi-element character vector as it said
in the function description
# sergeant 0.1.2.9000
* support embedded drill JDBC connection
# sergeant 0.1.1.9000
* tweaked `drill_query()` and `drill_version()`
# sergeant 0.1.0.9000
* Added JDBC connector and included JDBC driver in the package (for now)
* Changed idiom to piping in a connection object
* Added a `NEWS.md` file to track changes to the package.

11
R/aaa.r

@ -0,0 +1,11 @@
utils::globalVariables(c("error", "everything", "isDirectory", "name", "params",
"permissions", "query", "error_msg"))
make_server <- function(drill_con) {
sprintf("%s://%s:%s",
ifelse(drill_con$ssl[1], "https", "http"),
drill_con$host, drill_con$port)
}
#

425
R/jdbc.r

@ -0,0 +1,425 @@
.fillStatementParameters <- function(s, l) {
for (i in 1:length(l)) {
v <- l[[i]]
if (is.na(v)) { # map NAs to NULLs (courtesy of Axel Klenk)
sqlType <- if (is.integer(v)) 4 else if (is.numeric(v)) 8 else 12
rJava::.jcall(s, "V", "setNull", i, as.integer(sqlType))
} else if (is.integer(v))
rJava::.jcall(s, "V", "setInt", i, v[1])
else if (is.numeric(v))
rJava::.jcall(s, "V", "setDouble", i, as.double(v)[1])
else
rJava::.jcall(s, "V", "setString", i, as.character(v)[1])
}
}
#' JDBC Driver for Drill database.
#'
#' @keywords internal
#' @export
setClass(
Class = "DrillJDBCDriver",
contains = "JDBCDriver"
)
#' Drill JDBC connection class.
#'
#' @export
#' @keywords internal
#' @export
setClass(
Class = "DrillJDBCConnection",
contains = "JDBCConnection"
)
#' Connect to Drill JDBC with your own connection string
#'
#' You should really use [drill_jdbc()] as it handles some cruft for
#' you, but you can specify the full JDBC connection string
#'
#' @md
#' @family Drill JDBC API
#' @param drv what you get back from [DrillJDBC()]
#' @param url your Drill connection strinfg
#' @param user,password username & password (leave as-is for no-auth)
#' @param ... additional `name=val` properties which will be set with Java's
#' `SetProperty` method.
#' @export
setMethod(
f = "dbConnect",
signature = "DrillJDBCDriver",
definition = function(drv, url, user='', password='', ...) {
rJava::.jcall(
"java/sql/DriverManager",
"Ljava/sql/Connection;",
"getConnection",
as.character(url)[1],
as.character(user)[1],
as.character(password)[1],
check = FALSE
) -> jc
if (rJava::is.jnull(jc) && !rJava::is.jnull(drv@jdrv)) {
# ok one reason for this to fail is its interaction with rJava's
# class loader. In that case we try to load the driver directly.
oex <- rJava::.jgetEx(TRUE)
p <- rJava::.jnew("java/util/Properties")
if (length(user)==1 && nchar(user)) {
rJava::.jcall(p,"Ljava/lang/Object;","setProperty","user",user)
}
if (length(password)==1 && nchar(password)) {
rJava::.jcall(p,"Ljava/lang/Object;","setProperty","password",password)
}
l <- list(...)
if (length(names(l))) for (n in names(l)) {
rJava::.jcall(p, "Ljava/lang/Object;", "setProperty", n, as.character(l[[n]]))
}
jc <- rJava::.jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], p)
}
.verify.JDBC.result(jc, "Unable to connect JDBC to ",url)
new("DrillJDBCConnection", jc=jc, identifier.quote=drv@identifier.quote)
},
valueClass = "DrillJDBCConnection"
)
#' Drill JDBC dbDataType
#'
#' @param dbObj A \code{\linkS4class{DrillJDBCDriver}} object
#' @param obj Any R object
#' @param ... Extra optional parameters
#' @family Drill JDBC API
#' @export
setMethod(
"dbDataType",
"DrillJDBCConnection",
function(dbObj, obj, ...) {
if (is.integer(obj)) "INTEGER"
else if (inherits(obj, "Date")) "DATE"
else if (identical(class(obj), "times")) "TIME"
else if (inherits(obj, "POSIXct")) "TIMESTAMP"
else if (is.numeric(obj)) "DOUBLE"
else "VARCHAR(255)"
},
valueClass = "character"
)
#' Drill's JDBC driver main class loader
#'
#' @family Drill JDBC API
#' @export
DrillJDBC <- function() {
driverClass <- "org.apache.drill.jdbc.Driver"
## expand all paths in the classPath
classPath <- path.expand(unlist(strsplit(Sys.getenv("DRILL_JDBC_JAR"), .Platform$path.sep)))
## this is benign in that it's equivalent to rJava::.jaddClassPath if a JVM is running
rJava::.jinit(classPath)
rJava::.jaddClassPath(system.file("java", "RJDBC.jar", package="RJDBC"))
rJava::.jaddClassPath(system.file("java", "slf4j-nop-1.7.25.jar", package = "sergeant.caffeinated"))
if (nchar(driverClass) && rJava::is.jnull(rJava::.jfindClass(as.character(driverClass)[1]))) {
stop("Cannot find JDBC driver class ",driverClass)
}
jdrv <- rJava::.jnew(driverClass, check=FALSE)
rJava::.jcheck(TRUE)
if (rJava::is.jnull(jdrv)) jdrv <- rJava::.jnull()
new("DrillJDBCDriver", identifier.quote = "`", jdrv = jdrv)
}
#' Connect to Drill using JDBC
#'
#' The DRILL JDBC driver fully-qualified path must be placed in the
#' \code{DRILL_JDBC_JAR} environment variable. This is best done via \code{~/.Renviron}
#' for interactive work. e.g. \code{DRILL_JDBC_JAR=/usr/local/drill/jars/jdbc-driver/drill-jdbc-all-1.10.0.jar}
#'
#' [src_drill_jdbc()] wraps the JDBC [dbConnect()] connection instantation in
#' [dbplyr::src_dbi()] to return the equivalent of the REST driver's [src_drill()].
#'
#' @param nodes character vector of nodes. If more than one node, you can either have
#' a single string with the comma-separated node:port pairs pre-made or
#' pass in a character vector with multiple node:port strings and the
#' function will make a comma-separated node string for you.
#' @param cluster_id the cluster id from \code{drill-override.conf}
#' @param schema an optional schema name to append to the JDBC connection string
#' @param use_zk are you connecting to a ZooKeeper instance (default: \code{TRUE}) or
#' connecting to an individual DrillBit.
#' @family Drill JDBC API
#' @return a JDBC connection object
#' @references \url{https://drill.apache.org/docs/using-the-jdbc-driver/#using-the-jdbc-url-for-a-random-drillbit-connection}
#' @export
#' @examples \dontrun{
#' con <- drill_jdbc("localhost:2181", "main")
#' drill_query(con, "SELECT * FROM cp.`employee.json`")
#'
#' # you can also use the connection with RJDBC calls:
#' dbGetQuery(con, "SELECT * FROM cp.`employee.json`")
#'
#' # for local/embedded mode with default configuration info
#' con <- drill_jdbc("localhost:31010", use_zk=FALSE)
#' }
drill_jdbc <- function(nodes = "localhost:2181", cluster_id = NULL,
schema = NULL, use_zk = TRUE) {
try_require("rJava")
try_require("RJDBC")
jar_path <- Sys.getenv("DRILL_JDBC_JAR")
if (!file.exists(jar_path)) {
stop(sprintf("Cannot locate DRILL JDBC JAR [%s]", jar_path))
}
drill_jdbc_drv <- DrillJDBC()
conn_type <- "drillbit"
if (use_zk) conn_type <- "zk"
if (length(nodes) > 1) nodes <- paste0(nodes, collapse=",")
conn_str <- sprintf("jdbc:drill:%s=%s", conn_type, nodes)
if (!is.null(cluster_id)) {
conn_str <- sprintf("%s%s", conn_str, sprintf("/drill/%s", cluster_id))
}
if (!is.null(schema)) conn_str <- sprintf("%s;%s", schema)
message(sprintf("Using [%s]...", conn_str))
dbConnect(drill_jdbc_drv, conn_str)
}
#' @rdname drill_jdbc
#' @family Drill JDBC API
#' @export
src_drill_jdbc <- function(nodes = "localhost:2181", cluster_id = NULL,
schema = NULL, use_zk = TRUE) {
con <- drill_jdbc(nodes, cluster_id, schema, use_zk)
src_sql("drill_jdbc", con)
}
#' @rdname drill_jdbc
#' @param src A Drill "src" created with \code{src_drill()}
#' @param from A Drill view or table specification
#' @param ... Extra parameters
#' @family Drill JDBC API
#' @export
tbl.src_drill_jdbc <- function(src, from, ...) {
tbl_sql("drill_jdbc", src=src, from=from, ...)
}
#' Drill internals
#'
#' @rdname drill_jdbc_internals
#' @keywords internal
#' @export
db_data_type.DrillJDBCConnection <- function(con, fields, ...) {
data_type <- function(x) {
switch(
class(x)[1],
logical = "BOOLEAN",
integer = "INTEGER",
numeric = "DOUBLE",
factor = "CHARACTER",
character = "CHARACTER",
Date = "DATE",
POSIXct = "TIMESTAMP",
stop("Can't map type ", paste(class(x), collapse = "/"),
" to a supported database type.")
)
}
vapply(fields, data_type, character(1))
}
#' Drill internals
#'
#' @rdname drill_jdbc_internals
#' @keywords internal
#' @export
db_data_type.tbl_drill_jdbc <- db_data_type.DrillJDBCConnection
#' @rdname drill_jdbc_internals
#' @keywords internal
#' @export
setClass("DrillJDBCResult", representation("JDBCResult", jr="jobjRef", md="jobjRef", stat="jobjRef", pull="jobjRef"))
#' @rdname drill_jdbc_internals
#' @keywords internal
#' @export
setMethod(
f = "dbSendQuery",
signature = signature(conn="DrillJDBCConnection", statement="character"),
definition = function(conn, statement, ..., list=NULL) {
statement <- as.character(statement)[1L]
## if the statement starts with {call or {?= call then we use CallableStatement
if (isTRUE(as.logical(grepl("^\\{(call|\\?= *call)", statement)))) {
s <- rJava::.jcall(conn@jc, "Ljava/sql/CallableStatement;", "prepareCall", statement, check=FALSE)
.verify.JDBC.result(s, "Unable to execute JDBC callable statement ",statement)
if (length(list(...))) .fillStatementParameters(s, list(...))
if (!is.null(list)) .fillStatementParameters(s, list)
r <- rJava::.jcall(s, "Ljava/sql/ResultSet;", "executeQuery", check=FALSE)
.verify.JDBC.result(r, "Unable to retrieve JDBC result set for ",statement)
} else if (length(list(...)) || length(list)) { ## use prepared statements if there are additional arguments
s <- rJava::.jcall(conn@jc, "Ljava/sql/PreparedStatement;", "prepareStatement", statement, check=FALSE)
.verify.JDBC.result(s, "Unable to execute JDBC prepared statement ", statement)
if (length(list(...))) .fillStatementParameters(s, list(...))
if (!is.null(list)) .fillStatementParameters(s, list)
r <- rJava::.jcall(s, "Ljava/sql/ResultSet;", "executeQuery", check=FALSE)
.verify.JDBC.result(r, "Unable to retrieve JDBC result set for ",statement)
} else { ## otherwise use a simple statement some DBs fail with the above)
s <- rJava::.jcall(conn@jc, "Ljava/sql/Statement;", "createStatement")
.verify.JDBC.result(s, "Unable to create simple JDBC statement ",statement)
r <- rJava::.jcall(s, "Ljava/sql/ResultSet;", "executeQuery", as.character(statement)[1], check=FALSE)
.verify.JDBC.result(r, "Unable to retrieve JDBC result set for ",statement)
}
md <- rJava::.jcall(r, "Ljava/sql/ResultSetMetaData;", "getMetaData", check=FALSE)
.verify.JDBC.result(md, "Unable to retrieve JDBC result set meta data for ",statement, " in dbSendQuery")
new("DrillJDBCResult", jr=r, md=md, stat=s, pull=rJava::.jnull())
})
#' @rdname drill_jdbc_internals
#' @keywords internal
#' @export
sql_escape_ident.DrillJDBCConnection <- function(con, x) {
ifelse(grepl(con@identifier.quote, x), sql_quote(x, ' '), sql_quote(x, con@identifier.quote))
}
#' @rdname drill_jdbc_internals
#' @keywords internal
#' @export
sql_translate_env.DrillJDBCConnection <- function(con) {
x <- con
dbplyr::sql_variant(
scalar = dbplyr::sql_translator(
.parent = dbplyr::base_scalar,
`!=` = dbplyr::sql_infix("<>"),
as.numeric = function(x) build_sql("CAST(", x, " AS DOUBLE)"),
as.character = function(x) build_sql("CAST(", x, " AS CHARACTER)"),
as.date = function(x) build_sql("CAST(", x, " AS DATE)"),
as.posixct = function(x) build_sql("CAST(", x, " AS TIMESTAMP)"),
as.logical = function(x) build_sql("CAST(", x, " AS BOOLEAN)"),
date_part = function(x, y) build_sql("DATE_PART(", x, ",", y ,")"),
grepl = function(x, y) build_sql("CONTAINS(", y, ", ", x, ")"),
gsub = function(x, y, z) build_sql("REGEXP_REPLACE(", z, ", ", x, ",", y ,")"),
str_replace = function(x, y, z) build_sql("REGEXP_REPLACE(", x, ", ", y, ",", z ,")"),
trimws = function(x) build_sql("TRIM(both ' ' FROM ", x, ")"),
cbrt = sql_prefix("CBRT", 1),
degrees = sql_prefix("DEGREES", 1),
e = sql_prefix("E", 0),
row_number = sql_prefix("row_number", 0),
lshift = sql_prefix("LSHIFT", 2),
mod = sql_prefix("MOD", 2),
age = sql_prefix("AGE", 1),
negative = sql_prefix("NEGATIVE", 1),
pi = sql_prefix("PI", 0),
pow = sql_prefix("POW", 2),
radians = sql_prefix("RADIANS", 1),
rand = sql_prefix("RAND", 0),
rshift = sql_prefix("RSHIFT", 2),
trunc = sql_prefix("TRUNC", 2),
contains = sql_prefix("CONTAINS", 2),
convert_to = sql_prefix("CONVERT_TO", 2),
convert_from = sql_prefix("CONVERT_FROM", 2),
string_binary = sql_prefix("STRING_BINARY", 1),
binary_string = sql_prefix("BINARY_STRING", 1),
to_char = sql_prefix("TO_CHAR", 2),
to_date = sql_prefix("TO_DATE", 2),
to_number = sql_prefix("TO_NUMBER", 2),
char_to_timestamp = sql_prefix("TO_TIMESTAMP", 2),
double_to_timestamp = sql_prefix("TO_TIMESTAMP", 1),
char_length = sql_prefix("CHAR_LENGTH", 1),
flatten = sql_prefix("FLATTEN", 1),
kvgen = sql_prefix("KVGEN", 1),
repeated_count = sql_prefix("REPEATED_COUNT", 1),
repeated_contains = sql_prefix("REPEATED_CONTAINS", 2),
ilike = sql_prefix("ILIKE", 2),
init_cap = sql_prefix("INIT_CAP", 1),
length = sql_prefix("LENGTH", 1),
lower = sql_prefix("LOWER", 1),
str_to_lower = sql_prefix("LOWER", 1),
tolower = sql_prefix("LOWER", 1),
ltrim = sql_prefix("LTRIM", 2),
nullif = sql_prefix("NULLIF", 2),
position = function(x, y) build_sql("POSITION(", x, " IN ", y, ")"),
regexp_replace = sql_prefix("REGEXP_REPLACE", 3),
rtrim = sql_prefix("RTRIM", 2),
rpad = sql_prefix("RPAD", 2),
rpad_with = sql_prefix("RPAD", 3),
lpad = sql_prefix("LPAD", 2),
lpad_with = sql_prefix("LPAD", 3),
strpos = sql_prefix("STRPOS", 2),
substr = sql_prefix("SUBSTR", 3),
str_sub = sql_prefix("SUBSTR", 3),
trim = function(x, y, z) build_sql("TRIM(", x, " ", y, " FROM ", z, ")"),
upper = sql_prefix("UPPER", 1),
str_to_upper = sql_prefix("UPPER", 1),
toupper = sql_prefix("UPPER", 1)
),
aggregate = dbplyr::sql_translator(
.parent = dbplyr::base_agg,
n = function() dbplyr::sql("COUNT(*)"),
cor = dbplyr::sql_prefix("CORR"),
cov = dbplyr::sql_prefix("COVAR_SAMP"),
sd = dbplyr::sql_prefix("STDDEV_SAMP"),
var = dbplyr::sql_prefix("VAR_SAMP"),
n_distinct = function(x) {
dbplyr::build_sql(dbplyr::sql("COUNT(DISTINCT "), x, dbplyr::sql(")"))
}
),
window = dbplyr::sql_translator(
.parent = dbplyr::base_win,
n = function() { dbplyr::win_over(dbplyr::sql("count(*)"),
partition = dbplyr::win_current_group()) },
cor = dbplyr::win_recycled("corr"),
cov = dbplyr::win_recycled("covar_samp"),
sd = dbplyr::win_recycled("stddev_samp"),
var = dbplyr::win_recycled("var_samp"),
all = dbplyr::win_recycled("bool_and"),
any = dbplyr::win_recycled("bool_or")
)
)
}
#' src tbls
#'
#' "SHOW DATABASES"
#'
#' @rdname drill_jdbc_internals
#' @family Drill JDBC API
#' @keywords internal
#' @param x x
#' @export
src_tbls.src_dbi <- function(x) {
tmp <- dbGetQuery(x$con, "SHOW DATABASES")
paste0(unlist(tmp$SCHEMA_NAME, use.names=FALSE), collapse=", ")
}

68
R/sergeant-caffeinated-package.R

@ -1,12 +1,62 @@
#' ...
#'
#' - URL: <https://gitlab.com/hrbrmstr/sergeant-caffeinated>
#' - BugReports: <https://gitlab.com/hrbrmstr/sergeant-caffeinated/issues>
#'
#' @md
#' @name sergeant-caffeinated
#' Tools to Transform and Query Data with 'Apache' 'Drill'
#'
#' Drill is an innovative low-latency distributed query engine designed to enable data
#' exploration and analytics on both relational and non-relational datastores, scaling to
#' petabytes of data. Users can query the data using standard SQL and BI tools without
#' having to create and manage schemas. Some of the key features are:
#'
#' \itemize{
#' \item{Schema-free JSON document model similar to MongoDB and Elasticsearch}
#' \item{Industry-standard APIs: ANSI SQL, ODBC/JDBC, RESTful APIs}
#' \item{Extremely user and developer friendly}
#' \item{Pluggable architecture enables connectivity to multiple datastores}
#' }
#'
#' Drill includes a distributed execution environment, purpose built for large-scale data
#' processing. At the core of Drill is the "Drillbit" service which is responsible for
#' accepting requests from the client, processing the queries, and returning results to
#' the client.
#'
#' You can install and run a Drillbit service on one node or on many nodes to form a
#' distributed cluster environment. When a Drillbit runs on each data node in a cluster,
#' Drill can maximize data locality during query execution without moving data over the
#' network or between nodes. Drill uses ZooKeeper to maintain cluster membership and health
#' check information.
#'
#' Methods are provided to work with Drill via the native JDBC & REST APIs along with R
#' \code{DBI} and \code{dplyr} interfaces.
#'
#' @name sergeant.caffeinated
#' @references \href{https://drill.apache.org/docs/}{Drill documentation}
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @import httr
#' @importFrom jsonlite fromJSON
#' @importFrom dplyr mutate select left_join bind_cols bind_rows data_frame tbl filter
#' @importFrom dplyr db_desc src db_data_type db_explain sql_translate_env copy_to %>%
#' @importFrom dplyr db_query_fields src_tbls sql_escape_ident
#' @importFrom dbplyr build_sql sql_prefix sql_quote src_sql tbl_sql
#' @importFrom dbplyr win_recycled win_current_group base_win base_agg base_scalar win_over sql
#' @import utils
#' @import DBI methods
#' @importFrom scales comma
#' @importClassesFrom RJDBC JDBCDriver JDBCConnection JDBCResult
NULL
#' sergeant exported operators
#'
#' The following functions are imported and then re-exported
#' from the sergeant package to enable use of the magrittr
#' pipe operator with no additional library calls
#'
#' @name sergeant-caffeinated-exports
NULL
#' @name %>%
#' @export
#' @rdname sergeant-caffeinated-exports
NULL
#' @name tbl
#' @export
#' @rdname sergeant-caffeinated-exports
NULL

21
R/utils.r

@ -0,0 +1,21 @@
.verify.JDBC.result <- function (result, ...) {
if (rJava::is.jnull(result)) {
x <- rJava::.jgetEx(TRUE)
if (rJava::is.jnull(x))
stop(...)
else
stop(...," (",rJava::.jcall(x, "S", "getMessage"),")")
}
}
try_require <- function(package, fun) {
if (requireNamespace(package, quietly = TRUE)) {
library(package, character.only = TRUE)
return(invisible())
}
stop("Package `", package, "` required for `", fun , "`.\n", # nocov start
"Please install and try again.", call. = FALSE) # nocov end
}

3
R/zzz.R

@ -0,0 +1,3 @@
.onLoad <- function(libname, pkgname) {
if (requireNamespace("rJava")) rJava::.jpackage(pkgname, lib.loc = libname)
}

104
README.Rmd

@ -1,32 +1,120 @@
---
output: rmarkdown::github_document
output: github_document
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# sergeant-caffeinated
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "##",
fig.path = "README-"
)
```
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1248912.svg)](https://doi.org/10.5281/zenodo.1248912)
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/sergeant-caffeinated.svg?branch=master)](https://travis-ci.org/hrbrmstr/sergeant-caffeinated)
[![Coverage Status](https://codecov.io/gh/hrbrmstr/sergeant-caffeinated/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/sergeant-caffeinated)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/sergeant-caffeinated)](https://cran.r-project.org/package=sergeant-caffeinated)
# 💂☕️ sergeant.caffeinated
Tools to Transform and Query Data with 'Apache' 'Drill' (JDBC)
## NOTE
This is the Java/JDBC-interface to Apache Drill. For non-Java/JDBC, see the `sergeant` package ([GitLab](https://gitlab.com/hrbrmstr/sergeant/); [GitHub](https://github.com/hrbrmstr/sergeant/)).
## Description
## What's Inside The Tin
Drill + `sergeant` is (IMO) a streamlined alternative to Spark + `sparklyr` if you don't need the ML components of Spark (i.e. just need to query "big data" sources, need to interface with parquet, need to combine disparate data source types — json, csv, parquet, rdbms - for aggregation, etc). Drill also has support for spatial queries.
Using Drill SQL queries that reference parquet files on a local linux or macOS workstation can often be more performant than doing the same data ingestion & wrangling work with R (especially for large or disperate data sets). Drill can often help further streaming workflows that infolve wrangling many tiny JSON files on a daily basis.
Drill can be obtained from <https://drill.apache.org/download/> (use "Direct File Download"). Drill can also be installed via [Docker](https://drill.apache.org/docs/running-drill-on-docker/). For local installs on Unix-like systems, a common/suggestion location for the Drill directory is `/usr/local/drill` as the install directory.
Drill embedded (started using the `$DRILL_BASE_DIR/bin/drill-embedded` script) is a super-easy way to get started playing with Drill on a single workstation and most of many workflows can "get by" using Drill this way.
The following functions are implemented:
**`DBI`** (RJDBC)
- `drill_jdbc`: Connect to Drill using JDBC, enabling use of said idioms. See `RJDBC` for more info.
NOTE: The DRILL JDBC driver fully-qualified path must be placed in the `DRILL_JDBC_JAR` environment variable. This is best done via `~/.Renviron` for interactive work. i.e. `DRILL_JDBC_JAR=/usr/local/drill/jars/drill-jdbc-all-1.14.0.jar`
**`dplyr`**: (RJDBC)
- `src_drill_jdbc`: Connect to Drill (using dplyr & RJDBC) + supporting functions
## Installation
```{r eval=FALSE}
devtools::install_git("https://gitlab.com/hrbrmstr/sergeant-caffeinated")
# OF
devtools::install_github("hrbrmstr/sergeant-caffeinated")
```
```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
options(width=120)
```
## Usage
```{r message=FALSE, warning=FALSE, error=FALSE}
library(sergeant-caffeinated)
```{r dplyr-01, message=FALSE}
library(sergeant.caffeinated)
library(tidyverse)
# use localhost if running standalone on same system otherwise the host or IP of your Drill server
ds <- src_drill_jdbc("localhost") #ds
db <- tbl(ds, "cp.`employee.json`")
# current verison
packageVersion("sergeant-caffeinated")
# without `collect()`:
count(db, gender, marital_status)
count(db, gender, marital_status) %>% collect()
group_by(db, position_title) %>%
count(gender) -> tmp2
group_by(db, position_title) %>%
count(gender) %>%
ungroup() %>%
mutate(full_desc=ifelse(gender=="F", "Female", "Male")) %>%
collect() %>%
select(Title=position_title, Gender=full_desc, Count=n)
arrange(db, desc(employee_id)) %>% print(n=20)
mutate(db, position_title=tolower(position_title)) %>%
mutate(salary=as.numeric(salary)) %>%
mutate(gender=ifelse(gender=="F", "Female", "Male")) %>%
mutate(marital_status=ifelse(marital_status=="S", "Single", "Married")) %>%
group_by(supervisor_id) %>%
summarise(underlings_count=n()) %>%
collect()
```
```
### Test Results
```{r}
library(sergeant.caffeinated)
library(testthat)
date()
devtools::test()
```
## sergeant Metrics
```{r echo=FALSE}
cloc::cloc_pkg_md()
```
## 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.

230
README.md

@ -1,2 +1,230 @@
# sergeant-caffeinated
<!-- README.md is generated from README.Rmd. Please edit that file -->
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1248912.svg)](https://doi.org/10.5281/zenodo.1248912)
[![Travis-CI Build
Status](https://travis-ci.org/hrbrmstr/sergeant-caffeinated.svg?branch=master)](https://travis-ci.org/hrbrmstr/sergeant-caffeinated)
[![Coverage
Status](https://codecov.io/gh/hrbrmstr/sergeant-caffeinated/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/sergeant-caffeinated)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/sergeant-caffeinated)](https://cran.r-project.org/package=sergeant-caffeinated)
# 💂☕️ sergeant.caffeinated
Tools to Transform and Query Data with ‘Apache’ ‘Drill’ (JDBC)
## NOTE
This is the Java/JDBC-interface to Apache Drill. For non-Java/JDBC, see
the `sergeant` package ([GitLab](https://gitlab.com/hrbrmstr/sergeant/);
[GitHub](https://github.com/hrbrmstr/sergeant/)).
## Description
Drill + `sergeant` is (IMO) a streamlined alternative to Spark +
`sparklyr` if you don’t need the ML components of Spark (i.e. just need
to query “big data” sources, need to interface with parquet, need to
combine disparate data source types — json, csv, parquet, rdbms - for
aggregation, etc). Drill also has support for spatial queries.
Using Drill SQL queries that reference parquet files on a local linux or
macOS workstation can often be more performant than doing the same data
ingestion & wrangling work with R (especially for large or disperate
data sets). Drill can often help further streaming workflows that
infolve wrangling many tiny JSON files on a daily basis.
Drill can be obtained from <https://drill.apache.org/download/> (use
“Direct File Download”). Drill can also be installed via
[Docker](https://drill.apache.org/docs/running-drill-on-docker/). For
local installs on Unix-like systems, a common/suggestion location for
the Drill directory is `/usr/local/drill` as the install directory.
Drill embedded (started using the `$DRILL_BASE_DIR/bin/drill-embedded`
script) is a super-easy way to get started playing with Drill on a
single workstation and most of many workflows can “get by” using Drill
this way.
The following functions are implemented:
**`DBI`** (RJDBC)
- `drill_jdbc`: Connect to Drill using JDBC, enabling use of said
idioms. See `RJDBC` for more info.
NOTE: The DRILL JDBC driver fully-qualified path must be placed in the
`DRILL_JDBC_JAR` environment variable. This is best done via
`~/.Renviron` for interactive work. i.e.
`DRILL_JDBC_JAR=/usr/local/drill/jars/drill-jdbc-all-1.14.0.jar`
**`dplyr`**: (RJDBC)
- `src_drill_jdbc`: Connect to Drill (using dplyr & RJDBC) +
supporting
functions
## Installation
``` r
devtools::install_git("https://gitlab.com/hrbrmstr/sergeant-caffeinated")
# OF
devtools::install_github("hrbrmstr/sergeant-caffeinated")
```
## Usage
``` r
library(sergeant.caffeinated)
library(tidyverse)
# use localhost if running standalone on same system otherwise the host or IP of your Drill server
ds <- src_drill_jdbc("localhost") #ds
db <- tbl(ds, "cp.`employee.json`")
# without `collect()`:
count(db, gender, marital_status)
## # Source: lazy query [?? x 3]
## # Database: DrillJDBCConnection
## # Groups: gender
## gender marital_status n
## <chr> <chr> <dbl>
## 1 F S 297.
## 2 M M 278.
## 3 M S 276.
## 4 F M 304.
count(db, gender, marital_status) %>% collect()
## # A tibble: 4 x 3
## # Groups: gender [2]
## gender marital_status n
## * <chr> <chr> <dbl>
## 1 F S 297.
## 2 M M 278.
## 3 M S 276.
## 4 F M 304.
group_by(db, position_title) %>%
count(gender) -> tmp2
group_by(db, position_title) %>%
count(gender) %>%
ungroup() %>%
mutate(full_desc=ifelse(gender=="F", "Female", "Male")) %>%
collect() %>%
select(Title=position_title, Gender=full_desc, Count=n)
## # A tibble: 30 x 3
## Title Gender Count
## * <chr> <chr> <dbl>
## 1 President Female 1.
## 2 VP Country Manager Male 3.
## 3 VP Country Manager Female 3.
## 4 VP Information Systems Female 1.
## 5 VP Human Resources Female 1.
## 6 Store Manager Female 13.
## 7 VP Finance Male 1.
## 8 Store Manager Male 11.
## 9 HQ Marketing Female 2.
## 10 HQ Information Systems Female 4.
## # ... with 20 more rows
arrange(db, desc(employee_id)) %>% print(n=20)
## # Source: table<cp.`employee.json`> [?? x 16]
## # Database: DrillJDBCConnection
## # Ordered by: desc(employee_id)
## employee_id full_name first_name last_name position_id position_title store_id department_id birth_date hire_date
## <dbl> <chr> <chr> <chr> <dbl> <chr> <dbl> <dbl> <chr> <chr>
## 1 1156. Kris Stand Kris Stand 18. Store Tempora… 18. 18. 1914-02-02 1998-01-0…
## 2 1155. Vivian Bu… Vivian Burnham 18. Store Tempora… 18. 18. 1914-02-02 1998-01-0…
## 3 1154. Judy Dool… Judy Doolittle 18. Store Tempora… 18. 18. 1914-02-02 1998-01-0…
## 4 1153. Gail Pirn… Gail Pirnie 18. Store Tempora… 18. 18. 1914-02-02 1998-01-0…
## 5 1152. Barbara Y… Barbara Younce 17. Store Permane… 18. 17. 1914-02-02 1998-01-0…
## 6 1151. Burnis Bi… Burnis Biltoft 17. Store Permane… 18. 17. 1914-02-02 1998-01-0…
## 7 1150. Foster De… Foster Detwiler 17. Store Permane… 18. 17. 1914-02-02 1998-01-0…
## 8 1149. Bertha Ci… Bertha Ciruli 17. Store Permane… 18. 17. 1914-02-02 1998-01-0…
## 9 1148. Sharon Bi… Sharon Bishop 16. Store Tempora… 18. 16. 1914-02-02 1998-01-0…
## 10 1147. Jacquelin… Jacqueline Cutwright 16. Store Tempora… 18. 16. 1914-02-02 1998-01-0…
## 11 1146. Elizabeth… Elizabeth Anderson 16. Store Tempora… 18. 16. 1914-02-02 1998-01-0…
## 12 1145. Michael S… Michael Swartwood 16. Store Tempora… 18. 16. 1914-02-02 1998-01-0…
## 13 1144. Shirley C… Shirley Curtsinger 15. Store Permane… 18. 15. 1914-02-02 1998-01-0…
## 14 1143. Ana Quick Ana Quick 15. Store Permane… 18. 15. 1914-02-02 1998-01-0…
## 15 1142. Hazel Sou… Hazel Souza 15. Store Permane… 18. 15. 1914-02-02 1998-01-0…
## 16 1141. James Com… James Compagno 15. Store Permane… 18. 15. 1914-02-02 1998-01-0…
## 17 1140. Mona Jara… Mona Jaramillo 13. Store Shift S… 18. 11. 1961-09-24 1998-01-0…
## 18 1139. Jeanette … Jeanette Belsey 12. Store Assista… 18. 11. 1972-05-12 1998-01-0…
## 19 1138. James Eic… James Eichorn 18. Store Tempora… 12. 18. 1914-02-02 1998-01-0…
## 20 1137. Heather G… Heather Geiermann 18. Store Tempora… 12. 18. 1914-02-02 1998-01-0…
## # ... with more rows, and 6 more variables: salary <dbl>, supervisor_id <dbl>, education_level <chr>,
## # marital_status <chr>, gender <chr>, management_role <chr>
mutate(db, position_title=tolower(position_title)) %>%
mutate(salary=as.numeric(salary)) %>%
mutate(gender=ifelse(gender=="F", "Female", "Male")) %>%
mutate(marital_status=ifelse(marital_status=="S", "Single", "Married")) %>%
group_by(supervisor_id) %>%
summarise(underlings_count=n()) %>%
collect()
## # A tibble: 112 x 2
## supervisor_id underlings_count
## * <dbl> <dbl>
## 1 0. 1.
## 2 1. 7.
## 3 5. 9.
## 4 4. 2.
## 5 2. 3.
## 6 20. 2.
## 7 21. 4.
## 8 22. 7.
## 9 6. 4.
## 10 36. 2.
## # ... with 102 more rows
```
\`\`\` \#\#\# Test Results
``` r
library(sergeant.caffeinated)
library(testthat)
##
## Attaching package: 'testthat'
## The following object is masked from 'package:dplyr':
##
## matches
## The following object is masked from 'package:purrr':
##
## is_null
date()
## [1] "Sun Oct 14 09:01:46 2018"
devtools::test()
## Loading sergeant.caffeinated
## Testing sergeant.caffeinated
## ✔ | OK F W S | Context
##
⠏ | 0 | JDBC
⠋ | 1 | JDBC
⠙ | 2 | JDBC
⠹ | 3 | JDBC
✔ | 3 | JDBC [0.3 s]
##
## ══ Results ════════════════════════════════════════════════════════════════
## Duration: 0.3 s
##
## OK: 3
## Failed: 0
## Warnings: 0
## Skipped: 0
##
## Keep up the good work.
```
## sergeant Metrics
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) |
| :--- | -------: | ---: | --: | --: | ----------: | ---: | -------: | ---: |
| R | 7 | 0.88 | 302 | 0.9 | 78 | 0.68 | 164 | 0.77 |
| Rmd | 1 | 0.12 | 35 | 0.1 | 37 | 0.32 | 48 | 0.23 |
## 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.

0
.codecov.yml → codecov.yml

34
cran-comments.md

@ -0,0 +1,34 @@
## Test environments
* local macOS install, R 3.4.1
* local ubuntu 14.04 install, R 3.4.1
* ubuntu 12.04 (on travis-ci), R 3.4.1 and oldrel
* win-builder
## R CMD check results
0 errors | 0 warnings | 0 notes
* This is a new release.
## Reverse dependencies
This is a new release, so there are no reverse dependencies.
---
* WinBuilder seems to be working now (it found httr and covr in the last build).
* Removed png causing WinBuilder pandoc problems.
* R-hub is reporting httr and covr are not available so
I have not been able to get it to work successfully on that platform.
* The examples and tests are wrapped in \dontrun{} or testthat:::skip_on_cran()
since they absolutely require a running Apache Drill server. Full tests
are run on Travis (weekly) with results avaialble for review:
https://travis-ci.org/hrbrmstr/sergeant
The Travis tests install Apache Drill and test out the REST API calls
as well as the dplyr/dbplyr interface with live queries.
* Code coverage is run and is currently at 40%

105
docs/LICENSE.html

@ -0,0 +1,105 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>License • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script>
<script src="pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-license">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-12">
<div class="page-header">
<h1>License</h1>
</div>
<pre>YEAR: 2016
COPYRIGHT HOLDER: Bob Rudis
</pre>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

112
docs/authors.html

@ -0,0 +1,112 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authors • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script>
<script src="pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-authors">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-12">
<div class="page-header">
<h1>Authors</h1>
</div>
<ul class="list-unstyled">
<li>
<p><strong>Bob Rudis</strong>. Author, maintainer.
</p>
</li>
<li>
<p><strong>Edward Visel</strong>. Contributor.
</p>
</li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

571
docs/index.html

@ -0,0 +1,571 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tools to Transform and Query Data with 'Apache' 'Drill' • sergeant</title>
<!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script><script src="pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-vignette">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9">
<div class="contents">
<!-- README.md is generated from README.Rmd. Please edit that file -->
<p><img src="sergeant.png" width="33" align="left" style="padding-right:20px"></p>
<p><code>sergeant</code> : Tools to Transform and Query Data with ‘Apache’ ‘Drill’</p>
<p>Drill + <code>sergeant</code> is (IMO) a nice alternative to Spark + <code>sparklyr</code> if you don’t need the ML components of Spark (i.e. just need to query “big data” sources, need to interface with parquet, need to combine disparate data source types — json, csv, parquet, rdbms - for aggregation, etc). Drill also has support for spatial queries.</p>
<p>I find writing SQL queries to parquet files with Drill on a local linux or macOS workstation to be more performant than doing the data ingestion work with R (for large or disperate data sets). I also work with many tiny JSON files on a daily basis and Drill makes it much easier to do so. YMMV.</p>
<p>You can download Drill from <a href="https://drill.apache.org/download/" class="uri">https://drill.apache.org/download/</a> (use “Direct File Download”). I use <code>/usr/local/drill</code> as the install directory. <code>drill-embedded</code> is a super-easy way to get started playing with Drill on a single workstation and most of my workflows can get by using Drill this way. If there is sufficient desire for an automated downloader and a way to start the <code>drill-embedded</code> server from within R, please file an issue.</p>
<p>There are a few convenience wrappers for various informational SQL queries (like <code><a href="reference/drill_version.html">drill_version()</a></code>). Please file an PR if you add more.</p>
<p>The package has been written with retrieval of rectangular data sources in mind. If you need/want a version of <code><a href="reference/drill_query.html">drill_query()</a></code> that will enable returning of non-rectangular data (which is possible with Drill) then please file an issue.</p>
<p>Some of the more “controlling vs data ops” REST API functions aren’t implemented. Please file a PR if you need those.</p>
<p>Finally, I run most of this locally and at home, so it’s all been coded with no authentication or encryption in mind. If you want/need support for that, please file an issue. If there is demand for this, it will change the R API a bit (I’ve already thought out what to do but have no need for it right now).</p>
<p>The following functions are implemented:</p>
<p><strong><code>DBI</code></strong></p>
<ul>
<li>As complete of an R <code>DBI</code> driver has been implemented using the Drill REST API, mostly to facilitate the <code>dplyr</code> interface. Use the <code>RJDBC</code> driver interface if you need more <code>DBI</code> functionality.</li>
<li>This also means that SQL functions unique to Drill have also been “implemented” (i.e. made accessible to the <code>dplyr</code> interface). If you have custom Drill SQL functions that need to be implemented please file an issue on GitHub.</li>
</ul>
<p><strong><code>RJDBC</code></strong></p>
<ul>
<li>
<code>drill_jdbc</code>: Connect to Drill using JDBC, enabling use of said idioms. See <code>RJDBC</code> for more info.</li>
<li>NOTE: The DRILL JDBC driver fully-qualified path must be placed in the <code>DRILL_JDBC_JAR</code> environment variable. This is best done via <code>~/.Renviron</code> for interactive work. i.e. <code>DRILL_JDBC_JAR=/usr/local/drill/jars/drill-jdbc-all-1.9.0.jar</code>
</li>
</ul>
<p><strong><code>dplyr</code></strong>:</p>
<ul>
<li>
<code>src_drill</code>: Connect to Drill (using dplyr) + supporting functions</li>
</ul>
<p>See <code>dplyr</code> for the <code>dplyr</code> operations (light testing shows they work in basic SQL use-cases but Drill’s SQL engine has issues with more complex queries).</p>
<p><strong>Drill APIs</strong>:</p>
<ul>
<li>
<code>drill_connection</code>: Setup parameters for a Drill server/cluster connection</li>
<li>
<code>drill_active</code>: Test whether Drill HTTP REST API server is up</li>
<li>
<code>drill_cancel</code>: Cancel the query that has the given queryid</li>
<li>
<code>drill_jdbc</code>: Connect to Drill using JDBC</li>
<li>
<code>drill_metrics</code>: Get the current memory metrics</li>
<li>
<code>drill_options</code>: List the name, default, and data type of the system and session options</li>
<li>
<code>drill_profile</code>: Get the profile of the query that has the given query id</li>
<li>
<code>drill_profiles</code>: Get the profiles of running and completed queries</li>
<li>
<code>drill_query</code>: Submit a query and return results</li>
<li>
<code>drill_set</code>: Set Drill SYSTEM or SESSION options</li>
<li>
<code>drill_settings_reset</code>: Changes (optionally, all) session settings back to system defaults</li>
<li>
<code>drill_show_files</code>: Show files in a file system schema.</li>
<li>
<code>drill_show_schemas</code>: Returns a list of available schemas.</li>
<li>
<code>drill_stats</code>: Get Drillbit information, such as ports numbers</li>
<li>
<code>drill_status</code>: Get the status of Drill</li>
<li>
<code>drill_storage</code>: Get the list of storage plugin names and configurations</li>
<li>
<code>drill_system_reset</code>: Changes (optionally, all) system settings back to system defaults</li>
<li>
<code>drill_threads</code>: Get information about threads</li>
<li>
<code>drill_uplift</code>: Turn a columnar query results into a type-converted tbl</li>
<li>
<code>drill_use</code>: Change to a particular schema.</li>
<li>
<code>drill_version</code>: Identify the version of Drill running</li>
</ul>
<div id="installation" class="section level3">
<h3 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">devtools<span class="op">::</span><span class="kw">install_github</span>(<span class="st">"hrbrmstr/sergeant"</span>)</code></pre></div>
</div>
<div id="experimental-dplyr-interface" class="section level3">
<h3 class="hasAnchor">
<a href="#experimental-dplyr-interface" class="anchor"></a>Experimental <code>dplyr</code> interface</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(sergeant)
ds &lt;-<span class="st"> </span><span class="kw"><a href="reference/src_drill.html">src_drill</a></span>(<span class="st">"localhost"</span>) <span class="co"># use localhost if running standalone on same system otherwise the host or IP of your Drill server</span>
ds
<span class="co">#&gt; src: DrillConnection</span>
<span class="co">#&gt; tbls: INFORMATION_SCHEMA, cp.default, dfs.default, dfs.root, dfs.tmp, sys</span>
db &lt;-<span class="st"> </span><span class="kw">tbl</span>(ds, <span class="st">"cp.`employee.json`"</span>)
<span class="co"># without `collect()`:</span>
<span class="kw">count</span>(db, gender, marital_status)
<span class="co">#&gt; # Source: lazy query [?? x 3]</span>
<span class="co">#&gt; # Database: DrillConnection</span>
<span class="co">#&gt; # Groups: gender</span>
<span class="co">#&gt; marital_status gender n</span>
<span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt;</span>
<span class="co">#&gt; 1 S F 297</span>
<span class="co">#&gt; 2 M M 278</span>
<span class="co">#&gt; 3 S M 276</span>
<span class="co">#&gt; 4 M F 304</span>
<span class="co"># ^^ gets translated to:</span>
<span class="co"># </span>
<span class="co"># SELECT *</span>
<span class="co"># FROM (SELECT gender , marital_status , COUNT(*) AS n </span>
<span class="co"># FROM cp.`employee.json` </span>
<span class="co"># GROUP BY gender , marital_status ) govketbhqb </span>
<span class="co"># LIMIT 1000</span>
<span class="kw">count</span>(db, gender, marital_status) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">collect</span>()
<span class="co">#&gt; # A tibble: 4 x 3</span>
<span class="co">#&gt; # Groups: gender [2]</span>
<span class="co">#&gt; marital_status gender n</span>
<span class="co">#&gt; * &lt;chr&gt; &lt;chr&gt; &lt;int&gt;</span>
<span class="co">#&gt; 1 S F 297</span>
<span class="co">#&gt; 2 M M 278</span>
<span class="co">#&gt; 3 S M 276</span>
<span class="co">#&gt; 4 M F 304</span>
<span class="co"># ^^ gets translated to:</span>
<span class="co"># </span>
<span class="co"># SELECT gender , marital_status , COUNT(*) AS n </span>
<span class="co"># FROM cp.`employee.json` </span>
<span class="co"># GROUP BY gender , marital_status </span>
<span class="kw">group_by</span>(db, position_title) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">count</span>(gender) -&gt;<span class="st"> </span>tmp2
<span class="kw">group_by</span>(db, position_title) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">count</span>(gender) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">ungroup</span>() <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">mutate</span>(<span class="dt">full_desc=</span><span class="kw">ifelse</span>(gender<span class="op">==</span><span class="st">"F"</span>, <span class="st">"Female"</span>, <span class="st">"Male"</span>)) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">collect</span>() <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">select</span>(<span class="dt">Title=</span>position_title, <span class="dt">Gender=</span>full_desc, <span class="dt">Count=</span>n)
<span class="co">#&gt; # A tibble: 30 x 3</span>
<span class="co">#&gt; Title Gender Count</span>
<span class="co">#&gt; * &lt;chr&gt; &lt;chr&gt; &lt;int&gt;</span>
<span class="co">#&gt; 1 President Female 1</span>
<span class="co">#&gt; 2 VP Country Manager Male 3</span>
<span class="co">#&gt; 3 VP Country Manager Female 3</span>
<span class="co">#&gt; 4 VP Information Systems Female 1</span>
<span class="co">#&gt; 5 VP Human Resources Female 1</span>
<span class="co">#&gt; 6 Store Manager Female 13</span>
<span class="co">#&gt; 7 VP Finance Male 1</span>
<span class="co">#&gt; 8 Store Manager Male 11</span>
<span class="co">#&gt; 9 HQ Marketing Female 2</span>
<span class="co">#&gt; 10 HQ Information Systems Female 4</span>
<span class="co">#&gt; # ... with 20 more rows</span>
<span class="co"># ^^ gets translated to:</span>
<span class="co"># </span>
<span class="co"># SELECT position_title , gender , n ,</span>
<span class="co"># CASE WHEN ( gender = 'F') THEN ('Female') ELSE ('Male') </span><span class="re">END</span><span class="co"> AS full_desc </span>
<span class="co"># FROM (SELECT position_title , gender , COUNT(*) AS n </span>
<span class="co"># FROM cp.`employee.json` </span>
<span class="co"># GROUP BY position_title , gender ) dcyuypuypb </span>
<span class="kw">arrange</span>(db, <span class="kw">desc</span>(employee_id)) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">print</span>(<span class="dt">n=</span><span class="dv">20</span>)
<span class="co">#&gt; # Source: table&lt;cp.`employee.json`&gt; [?? x 16]</span>
<span class="co">#&gt; # Database: DrillConnection</span>
<span class="co">#&gt; # Ordered by: desc(employee_id)</span>
<span class="co">#&gt; store_id gender department_id birth_date supervisor_id last_name position_title hire_date</span>
<span class="co">#&gt; &lt;int&gt; &lt;chr&gt; &lt;int&gt; &lt;date&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;dttm&gt;</span>
<span class="co">#&gt; 1 18 F 18 1914-02-02 1140 Stand Store Temporary Stocker 1998-01-01</span>
<span class="co">#&gt; 2 18 M 18 1914-02-02 1140 Burnham Store Temporary Stocker 1998-01-01</span>
<span class="co">#&gt; 3 18 F 18 1914-02-02 1139 Doolittle Store Temporary Stocker 1998-01-01</span>
<span class="co">#&gt; 4 18 M 18 1914-02-02 1139 Pirnie Store Temporary Stocker 1998-01-01</span>
<span class="co">#&gt; 5 18 M 17 1914-02-02 1140 Younce Store Permanent Stocker 1998-01-01</span>
<span class="co">#&gt; 6 18 F 17 1914-02-02 1140 Biltoft Store Permanent Stocker 1998-01-01</span>
<span class="co">#&gt; 7 18 M 17 1914-02-02 1139 Detwiler Store Permanent Stocker 1998-01-01</span>
<span class="co">#&gt; 8 18 F 17 1914-02-02 1139 Ciruli Store Permanent Stocker 1998-01-01</span>
<span class="co">#&gt; 9 18 F 16 1914-02-02 1140 Bishop Store Temporary Checker 1998-01-01</span>
<span class="co">#&gt; 10 18 F 16 1914-02-02 1140 Cutwright Store Temporary Checker 1998-01-01</span>
<span class="co">#&gt; 11 18 F 16 1914-02-02 1139 Anderson Store Temporary Checker 1998-01-01</span>
<span class="co">#&gt; 12 18 F 16 1914-02-02 1139 Swartwood Store Temporary Checker 1998-01-01</span>
<span class="co">#&gt; 13 18 M 15 1914-02-02 1140 Curtsinger Store Permanent Checker 1998-01-01</span>
<span class="co">#&gt; 14 18 F 15 1914-02-02 1140 Quick Store Permanent Checker 1998-01-01</span>
<span class="co">#&gt; 15 18 M 15 1914-02-02 1139 Souza Store Permanent Checker 1998-01-01</span>
<span class="co">#&gt; 16 18 M 15 1914-02-02 1139 Compagno Store Permanent Checker 1998-01-01</span>
<span class="co">#&gt; 17 18 M 11 1961-09-24 1139 Jaramillo Store Shift Supervisor 1998-01-01</span>
<span class="co">#&gt; 18 18 M 11 1972-05-12 17 Belsey Store Assistant Manager 1998-01-01</span>
<span class="co">#&gt; 19 12 M 18 1914-02-02 1069 Eichorn Store Temporary Stocker 1998-01-01</span>
<span class="co">#&gt; 20 12 F 18 1914-02-02 1069 Geiermann Store Temporary Stocker 1998-01-01</span>
<span class="co">#&gt; # ... with more rows, and 8 more variables: management_role &lt;chr&gt;, salary &lt;dbl&gt;, marital_status &lt;chr&gt;, full_name &lt;chr&gt;,</span>
<span class="co">#&gt; # employee_id &lt;int&gt;, education_level &lt;chr&gt;, first_name &lt;chr&gt;, position_id &lt;int&gt;</span>
<span class="co"># ^^ gets translated to:</span>
<span class="co"># </span>
<span class="co"># SELECT *</span>
<span class="co"># FROM (SELECT *</span>
<span class="co"># FROM cp.`employee.json` </span>
<span class="co"># ORDER BY employee_id DESC) lvpxoaejbc </span>
<span class="co"># LIMIT 5</span>
<span class="kw">mutate</span>(db, <span class="dt">position_title=</span><span class="kw">tolower</span>(position_title)) <span class="op">%&gt;%</span>
<span class="st"> </span><span class="kw">mutate</span>(<span class="dt">salary=</span><span class="kw">as.numeric</span>(salary)) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">mutate</span>(<span class="dt">gender=</span><span class="kw">ifelse</span>(gender<span class="op">==</span><span class="st">"F"</span>, <span class="st">"Female"</span>, <span class="st">"Male"</span>)) <span class="op">%&gt;%</span>
<span class="st"> </span><span class="kw">mutate</span>(<span class="dt">marital_status=</span><span class="kw">ifelse</span>(marital_status<span class="op">==</span><span class="st">"S"</span>, <span class="st">"Single"</span>, <span class="st">"Married"</span>)) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">group_by</span>(supervisor_id) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">summarise</span>(<span class="dt">underlings_count=</span><span class="kw">n</span>()) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span><span class="kw">collect</span>()
<span class="co">#&gt; # A tibble: 112 x 2</span>
<span class="co">#&gt; supervisor_id underlings_count</span>
<span class="co">#&gt; * &lt;int&gt; &lt;int&gt;</span>
<span class="co">#&gt; 1 0 1</span>
<span class="co">#&gt; 2 1 7</span>
<span class="co">#&gt; 3 5 9</span>
<span class="co">#&gt; 4 4 2</span>
<span class="co">#&gt; 5 2 3</span>
<span class="co">#&gt; 6 20 2</span>
<span class="co">#&gt; 7 21 4</span>
<span class="co">#&gt; 8 22 7</span>
<span class="co">#&gt; 9 6 4</span>
<span class="co">#&gt; 10 36 2</span>
<span class="co">#&gt; # ... with 102 more rows</span>
<span class="co"># ^^ gets translated to:</span>
<span class="co"># </span>
<span class="co"># SELECT supervisor_id , COUNT(*) AS underlings_count </span>
<span class="co"># FROM (SELECT employee_id , full_name , first_name , last_name , position_id , position_title , store_id , department_id , birth_date , hire_date , salary , supervisor_id , education_level , gender , management_role , CASE WHEN ( marital_status = 'S') THEN ('Single') ELSE ('Married') </span><span class="re">END</span><span class="co"> AS marital_status </span>
<span class="co"># FROM (SELECT employee_id , full_name , first_name , last_name , position_id , position_title , store_id , department_id , birth_date , hire_date , salary , supervisor_id , education_level , marital_status , management_role , CASE WHEN ( gender = 'F') THEN ('Female') ELSE ('Male') </span><span class="re">END</span><span class="co"> AS gender </span>
<span class="co"># FROM (SELECT employee_id , full_name , first_name , last_name , position_id , position_title , store_id , department_id , birth_date , hire_date , supervisor_id , education_level , marital_status , gender , management_role , CAST( salary AS DOUBLE) AS salary </span>
<span class="co"># FROM (SELECT employee_id , full_name , first_name , last_name , position_id , store_id , department_id , birth_date , hire_date , salary , supervisor_id , education_level , marital_status , gender , management_role , LOWER( position_title ) AS position_title </span>
<span class="co"># FROM cp.`employee.json` ) cnjsqxeick ) bnbnjrubna ) wavfmhkczv ) zaxeyyicxo </span>
<span class="co"># GROUP BY supervisor_id </span></code></pre></div>
</div>
<div id="usage" class="section level3">
<h3 class="hasAnchor">
<a href="#usage" class="anchor"></a>Usage</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(sergeant)
<span class="co"># current verison</span>
<span class="kw">packageVersion</span>(<span class="st">"sergeant"</span>)
<span class="co">#&gt; [1] '0.5.0'</span>
dc &lt;-<span class="st"> </span><span class="kw"><a href="reference/drill_connection.html">drill_connection</a></span>(<span class="st">"localhost"</span>)
<span class="kw"><a href="reference/drill_active.html">drill_active</a></span>(dc)
<span class="co">#&gt; [1] TRUE</span>
<span class="kw"><a href="reference/drill_version.html">drill_version</a></span>(dc)
<span class="co">#&gt; [1] "1.10.0"</span>
<span class="kw"><a href="reference/drill_storage.html">drill_storage</a></span>(dc)<span class="op">$</span>name
<span class="co">#&gt; [1] "cp" "dfs" "hbase" "hive" "kudu" "mongo" "s3"</span></code></pre></div>
<p>Working with the built-in JSON data sets:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="reference/drill_query.html">drill_query</a></span>(dc, <span class="st">"SELECT * FROM cp.`employee.json` limit 100"</span>)
<span class="co">#&gt; Parsed with column specification:</span>
<span class="co">#&gt; cols(</span>
<span class="co">#&gt; store_id = col_integer(),</span>
<span class="co">#&gt; gender = col_character(),</span>
<span class="co">#&gt; department_id = col_integer(),</span>
<span class="co">#&gt; birth_date = col_date(format = ""),</span>
<span class="co">#&gt; supervisor_id = col_integer(),</span>
<span class="co">#&gt; last_name = col_character(),</span>
<span class="co">#&gt; position_title = col_character(),</span>
<span class="co">#&gt; hire_date = col_datetime(format = ""),</span>
<span class="co">#&gt; management_role = col_character(),</span>
<span class="co">#&gt; salary = col_double(),</span>
<span class="co">#&gt; marital_status = col_character(),</span>
<span class="co">#&gt; full_name = col_character(),</span>
<span class="co">#&gt; employee_id = col_integer(),</span>
<span class="co">#&gt; education_level = col_character(),</span>
<span class="co">#&gt; first_name = col_character(),</span>
<span class="co">#&gt; position_id = col_integer()</span>
<span class="co">#&gt; )</span>
<span class="co">#&gt; # A tibble: 100 x 16</span>
<span class="co">#&gt; store_id gender department_id birth_date supervisor_id last_name position_title hire_date management_role</span>
<span class="co">#&gt; * &lt;int&gt; &lt;chr&gt; &lt;int&gt; &lt;date&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;dttm&gt; &lt;chr&gt;</span>
<span class="co">#&gt; 1 0 F 1 1961-08-26 0 Nowmer President 1994-12-01 Senior Management</span>
<span class="co">#&gt; 2 0 M 1 1915-07-03 1 Whelply VP Country Manager 1994-12-01 Senior Management</span>
<span class="co">#&gt; 3 0 M 1 1969-06-20 1 Spence VP Country Manager 1998-01-01 Senior Management</span>
<span class="co">#&gt; 4 0 F 1 1951-05-10 1 Gutierrez VP Country Manager 1998-01-01 Senior Management</span>
<span class="co">#&gt; 5 0 F 2 1942-10-08 1 Damstra VP Information Systems 1994-12-01 Senior Management</span>
<span class="co">#&gt; 6 0 F 3 1949-03-27 1 Kanagaki VP Human Resources 1994-12-01 Senior Management</span>
<span class="co">#&gt; 7 9 F 11 1922-08-10 5 Brunner Store Manager 1998-01-01 Store Management</span>
<span class="co">#&gt; 8 21 F 11 1979-06-23 5 Blumberg Store Manager 1998-01-01 Store Management</span>
<span class="co">#&gt; 9 0 M 5 1949-08-26 1 Stanz VP Finance 1994-12-01 Senior Management</span>
<span class="co">#&gt; 10 1 M 11 1967-06-20 5 Murraiin Store Manager 1998-01-01 Store Management</span>
<span class="co">#&gt; # ... with 90 more rows, and 7 more variables: salary &lt;dbl&gt;, marital_status &lt;chr&gt;, full_name &lt;chr&gt;, employee_id &lt;int&gt;,</span>
<span class="co">#&gt; # education_level &lt;chr&gt;, first_name &lt;chr&gt;, position_id &lt;int&gt;</span>
<span class="kw"><a href="reference/drill_query.html">drill_query</a></span>(dc, <span class="st">"SELECT COUNT(gender) AS gender FROM cp.`employee.json` GROUP BY gender"</span>)
<span class="co">#&gt; Parsed with column specification:</span>
<span class="co">#&gt; cols(</span>
<span class="co">#&gt; gender = col_integer()</span>
<span class="co">#&gt; )</span>
<span class="co">#&gt; # A tibble: 2 x 1</span>
<span class="co">#&gt; gender</span>
<span class="co">#&gt; * &lt;int&gt;</span>
<span class="co">#&gt; 1 601</span>
<span class="co">#&gt; 2 554</span>
<span class="kw"><a href="reference/drill_options.html">drill_options</a></span>(dc)
<span class="co">#&gt; # A tibble: 113 x 4</span>
<span class="co">#&gt; name value type kind</span>
<span class="co">#&gt; * &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;</span>
<span class="co">#&gt; 1 planner.enable_hash_single_key TRUE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 2 store.parquet.reader.pagereader.queuesize 2 SYSTEM LONG</span>
<span class="co">#&gt; 3 planner.enable_limit0_optimization FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 4 store.json.read_numbers_as_double FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 5 planner.enable_constant_folding TRUE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 6 store.json.extended_types FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 7 planner.memory.non_blocking_operators_memory 64 SYSTEM LONG</span>
<span class="co">#&gt; 8 planner.enable_multiphase_agg TRUE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 9 exec.query_profile.debug_mode FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 10 planner.filter.max_selectivity_estimate_factor 1 SYSTEM DOUBLE</span>
<span class="co">#&gt; # ... with 103 more rows</span>
<span class="kw"><a href="reference/drill_options.html">drill_options</a></span>(dc, <span class="st">"json"</span>)
<span class="co">#&gt; # A tibble: 7 x 4</span>
<span class="co">#&gt; name value type kind</span>
<span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;</span>
<span class="co">#&gt; 1 store.json.read_numbers_as_double FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 2 store.json.extended_types FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 3 store.json.writer.uglify FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 4 store.json.reader.skip_invalid_records FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 5 store.json.reader.print_skipped_invalid_record_number FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 6 store.json.all_text_mode FALSE SYSTEM BOOLEAN</span>
<span class="co">#&gt; 7 store.json.writer.skip_null_fields TRUE SYSTEM BOOLEAN</span></code></pre></div>
</div>
<div id="working-with-parquet-files" class="section level2">
<h2 class="hasAnchor">
<a href="#working-with-parquet-files" class="anchor"></a>Working with parquet files</h2>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="reference/drill_query.html">drill_query</a></span>(dc, <span class="st">"SELECT * FROM dfs.`/usr/local/drill/sample-data/nation.parquet` LIMIT 5"</span>)
<span class="co">#&gt; Parsed with column specification:</span>
<span class="co">#&gt; cols(</span>
<span class="co">#&gt; N_COMMENT = col_character(),</span>
<span class="co">#&gt; N_NAME = col_character(),</span>
<span class="co">#&gt; N_NATIONKEY = col_integer(),</span>
<span class="co">#&gt; N_REGIONKEY = col_integer()</span>
<span class="co">#&gt; )</span>
<span class="co">#&gt; # A tibble: 5 x 4</span>
<span class="co">#&gt; N_COMMENT N_NAME N_NATIONKEY N_REGIONKEY</span>
<span class="co">#&gt; * &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;int&gt;</span>
<span class="co">#&gt; 1 haggle. carefully f ALGERIA 0 0</span>
<span class="co">#&gt; 2 al foxes promise sly ARGENTINA 1 1</span>
<span class="co">#&gt; 3 y alongside of the p BRAZIL 2 1</span>
<span class="co">#&gt; 4 eas hang ironic, sil CANADA 3 1</span>
<span class="co">#&gt; 5 y above the carefull EGYPT 4 4</span></code></pre></div>
<p>Including multiple parquet files in different directories (note the wildcard support):</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="reference/drill_query.html">drill_query</a></span>(dc, <span class="st">"SELECT * FROM dfs.`/usr/local/drill/sample-data/nations*/nations*.parquet` LIMIT 5"</span>)
<span class="co">#&gt; Parsed with column specification:</span>
<span class="co">#&gt; cols(</span>
<span class="co">#&gt; N_COMMENT = col_character(),</span>
<span class="co">#&gt; N_NAME = col_character(),</span>
<span class="co">#&gt; N_NATIONKEY = col_integer(),</span>
<span class="co">#&gt; N_REGIONKEY = col_integer(),</span>
<span class="co">#&gt; dir0 = col_character()</span>
<span class="co">#&gt; )</span>
<span class="co">#&gt; # A tibble: 5 x 5</span>
<span class="co">#&gt; N_COMMENT N_NAME N_NATIONKEY N_REGIONKEY dir0</span>
<span class="co">#&gt; * &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt;</span>
<span class="co">#&gt; 1 haggle. carefully f ALGERIA 0 0 nationsMF</span>
<span class="co">#&gt; 2 al foxes promise sly ARGENTINA 1 1 nationsMF</span>
<span class="co">#&gt; 3 y alongside of the p BRAZIL 2 1 nationsMF</span>
<span class="co">#&gt; 4 eas hang ironic, sil CANADA 3 1 nationsMF</span>
<span class="co">#&gt; 5 y above the carefull EGYPT 4 4 nationsMF</span></code></pre></div>
<div id="a-preview-of-the-built-in-support-for-spatial-ops" class="section level3">
<h3 class="hasAnchor">
<a href="#a-preview-of-the-built-in-support-for-spatial-ops" class="anchor"></a>A preview of the built-in support for spatial ops</h3>
<p>Via: <a href="https://github.com/k255/drill-gis" class="uri">https://github.com/k255/drill-gis</a></p>
<p>A common use case is to select data within boundary of given polygon:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="reference/drill_query.html">drill_query</a></span>(dc, <span class="st">"</span>
<span class="st">select columns[2] as city, columns[4] as lon, columns[3] as lat</span>
<span class="st"> from cp.`sample-data/CA-cities.csv`</span>
<span class="st"> where</span>
<span class="st"> ST_Within(</span>
<span class="st"> ST_Point(columns[4], columns[3]),</span>
<span class="st"> ST_GeomFromText(</span>
<span class="st"> 'POLYGON((-121.95 37.28, -121.94 37.35, -121.84 37.35, -121.84 37.28, -121.95 37.28))'</span>
<span class="st"> )</span>
<span class="st"> )</span>
<span class="st">"</span>)
<span class="co">#&gt; Parsed with column specification:</span>
<span class="co">#&gt; cols(</span>
<span class="co">#&gt; city = col_character(),</span>
<span class="co">#&gt; lon = col_double(),</span>
<span class="co">#&gt; lat = col_double()</span>
<span class="co">#&gt; )</span>
<span class="co">#&gt; # A tibble: 7 x 3</span>
<span class="co">#&gt; city lon lat</span>
<span class="co">#&gt; * &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;</span>
<span class="co">#&gt; 1 Burbank -121.9316 37.32328</span>
<span class="co">#&gt; 2 San Jose -121.8950 37.33939</span>
<span class="co">#&gt; 3 Lick -121.8458 37.28716</span>
<span class="co">#&gt; 4 Willow Glen -121.8897 37.30855</span>
<span class="co">#&gt; 5 Buena Vista -121.9166 37.32133</span>
<span class="co">#&gt; 6 Parkmoor -121.9308 37.32105</span>
<span class="co">#&gt; 7 Fruitdale -121.9327 37.31086</span></code></pre></div>
</div>
<div id="jdbc" class="section level3">
<h3 class="hasAnchor">
<a href="#jdbc" class="anchor"></a>JDBC</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(RJDBC)
<span class="co">#&gt; Loading required package: rJava</span>
<span class="co"># Use this if connecting to a cluster with zookeeper</span>
<span class="co"># con &lt;- drill_jdbc("drill-node:2181", "drillbits1") </span>
<span class="co"># Use the following if running drill-embedded</span>
con &lt;-<span class="st"> </span><span class="kw"><a href="reference/drill_jdbc.html">drill_jdbc</a></span>(<span class="st">"localhost:31010"</span>, <span class="dt">use_zk=</span><span class="ot">FALSE</span>)
<span class="co">#&gt; Using [jdbc:drill:drillbit=localhost:31010]...</span>
<span class="kw"><a href="reference/drill_query.html">drill_query</a></span>(con, <span class="st">"SELECT * FROM cp.`employee.json`"</span>)
<span class="co">#&gt; # A tibble: 1,155 x 16</span>
<span class="co">#&gt; employee_id full_name first_name last_name position_id position_title store_id department_id</span>
<span class="co">#&gt; * &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;</span>
<span class="co">#&gt; 1 1 Sheri Nowmer Sheri Nowmer 1 President 0 1</span>
<span class="co">#&gt; 2 2 Derrick Whelply Derrick Whelply 2 VP Country Manager 0 1</span>
<span class="co">#&gt; 3 4 Michael Spence Michael Spence 2 VP Country Manager 0 1</span>
<span class="co">#&gt; 4 5 Maya Gutierrez Maya Gutierrez 2 VP Country Manager 0 1</span>
<span class="co">#&gt; 5 6 Roberta Damstra Roberta Damstra 3 VP Information Systems 0 2</span>
<span class="co">#&gt; 6 7 Rebecca Kanagaki Rebecca Kanagaki 4 VP Human Resources 0 3</span>
<span class="co">#&gt; 7 8 Kim Brunner Kim Brunner 11 Store Manager 9 11</span>
<span class="co">#&gt; 8 9 Brenda Blumberg Brenda Blumberg 11 Store Manager 21 11</span>
<span class="co">#&gt; 9 10 Darren Stanz Darren Stanz 5 VP Finance 0 5</span>
<span class="co">#&gt; 10 11 Jonathan Murraiin Jonathan Murraiin 11 Store Manager 1 11</span>
<span class="co">#&gt; # ... with 1,145 more rows, and 8 more variables: birth_date &lt;chr&gt;, hire_date &lt;chr&gt;, salary &lt;dbl&gt;, supervisor_id &lt;dbl&gt;,</span>
<span class="co">#&gt; # education_level &lt;chr&gt;, marital_status &lt;chr&gt;, gender &lt;chr&gt;, management_role &lt;chr&gt;</span>
<span class="co"># but it can work via JDBC function calls, too</span>
<span class="kw">dbGetQuery</span>(con, <span class="st">"SELECT * FROM cp.`employee.json`"</span>) <span class="op">%&gt;%</span><span class="st"> </span>
<span class="st"> </span>tibble<span class="op">::</span><span class="kw">as_tibble</span>()
<span class="co">#&gt; # A tibble: 1,155 x 16</span>
<span class="co">#&gt; employee_id full_name first_name last_name position_id position_title store_id department_id</span>
<span class="co">#&gt; * &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;</span>
<span class="co">#&gt; 1 1 Sheri Nowmer Sheri Nowmer 1 President 0 1</span>
<span class="co">#&gt; 2 2 Derrick Whelply Derrick Whelply 2 VP Country Manager 0 1</span>
<span class="co">#&gt; 3 4 Michael Spence Michael Spence 2 VP Country Manager 0 1</span>
<span class="co">#&gt; 4 5 Maya Gutierrez Maya Gutierrez 2 VP Country Manager 0 1</span>
<span class="co">#&gt; 5 6 Roberta Damstra Roberta Damstra 3 VP Information Systems 0 2</span>
<span class="co">#&gt; 6 7 Rebecca Kanagaki Rebecca Kanagaki 4 VP Human Resources 0 3</span>
<span class="co">#&gt; 7 8 Kim Brunner Kim Brunner 11 Store Manager 9 11</span>
<span class="co">#&gt; 8 9 Brenda Blumberg Brenda Blumberg 11 Store Manager 21 11</span>
<span class="co">#&gt; 9 10 Darren Stanz Darren Stanz 5 VP Finance 0 5</span>
<span class="co">#&gt; 10 11 Jonathan Murraiin Jonathan Murraiin 11 Store Manager 1 11</span>
<span class="co">#&gt; # ... with 1,145 more rows, and 8 more variables: birth_date &lt;chr&gt;, hire_date &lt;chr&gt;, salary &lt;dbl&gt;, supervisor_id &lt;dbl&gt;,</span>
<span class="co">#&gt; # education_level &lt;chr&gt;, marital_status &lt;chr&gt;, gender &lt;chr&gt;, management_role &lt;chr&gt;</span></code></pre></div>
</div>
<div id="test-results" class="section level3">
<h3 class="hasAnchor">
<a href="#test-results" class="anchor"></a>Test Results</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(sergeant)
<span class="kw">library</span>(testthat)
<span class="co">#&gt; </span>
<span class="co">#&gt; Attaching package: 'testthat'</span>
<span class="co">#&gt; The following object is masked from 'package:dplyr':</span>
<span class="co">#&gt; </span>
<span class="co">#&gt; matches</span>
<span class="kw">date</span>()
<span class="co">#&gt; [1] "Sat Jun 17 20:47:11 2017"</span>
devtools<span class="op">::</span><span class="kw">test</span>()
<span class="co">#&gt; Loading sergeant</span>
<span class="co">#&gt; Testing sergeant</span>
<span class="co">#&gt; basic functionality: ..</span>
<span class="co">#&gt; </span>
<span class="co">#&gt; DONE ===================================================================================================================</span></code></pre></div>
</div>
<div id="code-of-conduct" class="section level3">
<h3 class="hasAnchor">
<a href="#code-of-conduct" class="anchor"></a>Code of Conduct</h3>
<p>Please note that this project is released with a <a href="CONDUCT.md">Contributor Code of Conduct</a>. By participating in this project you agree to abide by its terms.</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2 class="hasAnchor">
<a href="#sidebar" class="anchor"></a>Links</h2>
<ul class="list-unstyled">
<li>Browse source code at <br><a href="http://github.com/hrbrmstr/sergeant">http://​github.com/​hrbrmstr/​sergeant</a>
</li>
<li>Report a bug at <br><a href="https://github.com/hrbrmstr/sergeant/issues">https://​github.com/​hrbrmstr/​sergeant/​issues</a>
</li>
</ul>
<h2>License</h2>
<p><a href="https://opensource.org/licenses/mit-license.php">MIT</a> + file <a href="LICENSE.html">LICENSE</a></p>
<h2>Developers</h2>
<ul class="list-unstyled">
<li>Bob Rudis <br><small class="roles"> Author, maintainer </small> </li>
<li><a href="authors.html">All authors...</a></li>
</ul>
<h2>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://travis-ci.org/hrbrmstr/sergeant"><img src="https://travis-ci.org/hrbrmstr/sergeant.svg?branch=master" alt="Travis-CI Build Status"></a></li>
</ul>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

9
docs/jquery.sticky-kit.min.js

@ -0,0 +1,9 @@
/*
Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net
*/
(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k));
if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("<div />"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q,
u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),e<F&&(m=!1,c=q,null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),
h.detach()),b={position:"",width:"",top:""},a.css(b).removeClass(t).trigger("sticky_kit:unstick")),B&&(b=f.height(),u+q>b&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}),
a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize",
y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n<K;n++)d=this[n],J(b(d));return this}}).call(this);

12
docs/link.svg

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<style type="text/css">
.st0{fill:#75AADB;}
</style>
<path class="st0" d="M4,11.3h1.3v1.3H4c-2,0-4-2.3-4-4.7s2.1-4.7,4-4.7h5.3c1.9,0,4,2.3,4,4.7c0,1.9-1.2,3.6-2.7,4.3v-1.5
C11.4,10.2,12,9.1,12,8c0-1.7-1.4-3.3-2.7-3.3H4C2.7,4.7,1.3,6.3,1.3,8S2.7,11.3,4,11.3z M16,7.3h-1.3v1.3H16c1.3,0,2.7,1.6,2.7,3.3
s-1.4,3.3-2.7,3.3h-5.3C9.4,15.3,8,13.7,8,12c0-1.1,0.6-2.2,1.3-2.8V7.7C7.9,8.4,6.7,10.1,6.7,12c0,2.4,2.1,4.7,4,4.7H16
c1.9,0,4-2.3,4-4.7S18,7.3,16,7.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 810 B

210
docs/news/index.html

@ -0,0 +1,210 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>All news • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-news">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9">
<div class="page-header">
<h1>Change log <small>All releases</small></h1>
</div>
<div class="contents">
<div id="sergeant-0-5-0" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-5-0" class="anchor"></a>sergeant 0.5.0</h1>
<ul>
<li>make rJava &amp; RJDBC optional (WIP)</li>
</ul>
</div>
<div id="sergeant-0-4-0" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-4-0" class="anchor"></a>sergeant 0.4.0</h1>
<ul>
<li>Getting ready for new <code>dplyr</code> (thx to Edward Visel)</li>
<li>Cleaned up roxygen docs so that <code>src_drill</code> is exported now.</li>
</ul>
</div>
<div id="sergeant-0-3-2" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-3-2" class="anchor"></a>sergeant 0.3.2</h1>
<ul>
<li>Finally got quoting done. I thought I had before but I guess I hadn’t.</li>
<li>Added documnentation for built-in and custom Drill function that are supported.</li>
</ul>
</div>
<div id="sergeant-0-3-1-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-3-1-9000" class="anchor"></a>sergeant 0.3.1.9000</h1>
<ul>
<li>fixed <code><a href="../reference/src_drill.html">src_drill()</a></code> example</li>
<li>JDBC driver still in github repo but no longer included in pkg builds. See README.md or <code><a href="../reference/drill_jdbc.html">drill_jdbc()</a></code> help for more information on using the JDBC driver with sergeant.</li>
</ul>
</div>
<div id="sergeant-0-3-0-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-3-0-9000" class="anchor"></a>sergeant 0.3.0.9000</h1>
<ul>
<li>New DBI interface (to the REST API)</li>
<li>dplyr interface now uses the DBI interace to the REST API</li>
<li>CRAN checks pass besides size (removing JDBC driver in next dev iteration)</li>
</ul>
</div>
<div id="sergeant-0-2-1-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-2-1-9000" class="anchor"></a>sergeant 0.2.1.9000</h1>
<ul>
<li>implemented a large subset of Drill SQL Functions <a href="https://drill.apache.org/docs/about-sql-function-examples/" class="uri">https://drill.apache.org/docs/about-sql-function-examples/</a>
</li>
</ul>
</div>
<div id="sergeant-0-2-0-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-2-0-9000" class="anchor"></a>sergeant 0.2.0.9000</h1>
<ul>
<li>experimental alpha dplyr driver</li>
</ul>
</div>
<div id="sergeant-0-1-2-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-1-2-9000" class="anchor"></a>sergeant 0.1.2.9000</h1>
<ul>
<li>can pass RJDBC connections made with <code><a href="../reference/drill_jdbc.html">drill_jdbc()</a></code> to <code><a href="../reference/drill_query.html">drill_query()</a></code>
</li>
<li>finally enaled <code>nodes</code> parameter to be a multi-element character vector as it said in the function description</li>
</ul>
</div>
<div id="sergeant-0-1-2-9000-1" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-1-2-9000-1" class="anchor"></a>sergeant 0.1.2.9000</h1>
<ul>
<li>support embedded drill JDBC connection</li>
</ul>
</div>
<div id="sergeant-0-1-1-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-1-1-9000" class="anchor"></a>sergeant 0.1.1.9000</h1>
<ul>
<li>tweaked <code><a href="../reference/drill_query.html">drill_query()</a></code> and <code><a href="../reference/drill_version.html">drill_version()</a></code>
</li>
</ul>
</div>
<div id="sergeant-0-1-0-9000" class="section level1">
<h1 class="hasAnchor">
<a href="#sergeant-0-1-0-9000" class="anchor"></a>sergeant 0.1.0.9000</h1>
<ul>
<li>Added JDBC connector and included JDBC driver in the package (for now)</li>
<li>Changed idiom to piping in a connection object</li>
<li>Added a <code>NEWS.md</code> file to track changes to the package.</li>
</ul>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#sergeant-0-5-0">0.5.0</a></li>
<li><a href="#sergeant-0-4-0">0.4.0</a></li>
<li><a href="#sergeant-0-3-2">0.3.2</a></li>
<li><a href="#sergeant-0-3-1-9000">0.3.1.9000</a></li>
<li><a href="#sergeant-0-3-0-9000">0.3.0.9000</a></li>
<li><a href="#sergeant-0-2-1-9000">0.2.1.9000</a></li>
<li><a href="#sergeant-0-2-0-9000">0.2.0.9000</a></li>
<li><a href="#sergeant-0-1-2-9000">0.1.2.9000</a></li>
<li><a href="#sergeant-0-1-2-9000-1">0.1.2.9000</a></li>
<li><a href="#sergeant-0-1-1-9000">0.1.1.9000</a></li>
<li><a href="#sergeant-0-1-0-9000">0.1.0.9000</a></li>
</ul>
</div>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

158
docs/pkgdown.css

@ -0,0 +1,158 @@
/* Sticker footer */
body > .container {
display: flex;
padding-top: 60px;
min-height: calc(100vh);
flex-direction: column;
}
body > .container .row {
flex: 1;
}
footer {
margin-top: 45px;
padding: 35px 0 36px;
border-top: 1px solid #e5e5e5;
color: #666;
display: flex;
}
footer p {
margin-bottom: 0;
}
footer div {
flex: 1;
}
footer .pkgdown {
text-align: right;
}
footer p {
margin-bottom: 0;
}
img.icon {
float: right;
}
img {
max-width: 100%;
}
/* Section anchors ---------------------------------*/
a.anchor {
margin-left: -30px;
display:inline-block;
width: 30px;
height: 30px;
visibility: hidden;
background-image: url(./link.svg);
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: center center;
}
.hasAnchor:hover a.anchor {
visibility: visible;
}
@media (max-width: 767px) {
.hasAnchor:hover a.anchor {
visibility: hidden;
}
}
/* Fixes for fixed navbar --------------------------*/
.contents h1, .contents h2, .contents h3, .contents h4 {
padding-top: 60px;
margin-top: -60px;
}
/* Static header placement on mobile devices */
@media (max-width: 767px) {
.navbar-fixed-top {
position: absolute;
}
.navbar {
padding: 0;
}
}
/* Sidebar --------------------------*/
#sidebar {
margin-top: 30px;
}
#sidebar h2 {
font-size: 1.5em;
margin-top: 1em;
}
#sidebar h2:first-child {
margin-top: 0;
}
#sidebar .list-unstyled li {
margin-bottom: 0.5em;
}
/* Reference index & topics ----------------------------------------------- */
.ref-index th {font-weight: normal;}
.ref-index h2 {font-size: 20px;}
.ref-index td {vertical-align: top;}
.ref-index .alias {width: 40%;}
.ref-index .title {width: 60%;}
.ref-index .alias {width: 40%;}
.ref-index .title {width: 60%;}
.ref-arguments th {text-align: right; padding-right: 10px;}
.ref-arguments th, .ref-arguments td {vertical-align: top;}
.ref-arguments .name {width: 20%;}
.ref-arguments .desc {width: 80%;}
/* Nice scrolling for wide elements --------------------------------------- */
table {
display: block;
overflow: auto;
}
/* Syntax highlighting ---------------------------------------------------- */
pre {
word-wrap: normal;
word-break: normal;
border: 1px solid #eee;
}
pre, code {
background-color: #f8f8f8;
color: #333;
}
pre img {
background-color: #fff;
display: block;
}
code a, pre a {
color: #375f84;
}
.fl {color: #1514b5;}
.fu {color: #000000;} /* function */
.ch,.st {color: #036a07;} /* string */
.kw {color: #264D66;} /* keyword */
.co {color: #888888;} /* comment */
.message { color: black; font-weight: bolder;}
.error { color: orange; font-weight: bolder;}
.warning { color: #6A0366; font-weight: bolder;}

8
docs/pkgdown.js

@ -0,0 +1,8 @@
$(function() {
$("#sidebar").stick_in_parent({offset_top: 40});
$('body').scrollspy({
target: '#sidebar',
offset: 60
});
});

127
docs/reference/DrilDriver-class.html

@ -0,0 +1,127 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unload driver — dbUnloadDriver,DrillDriver-method • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Unload driver</h1>
</div>
<p>Unload driver</p>
<pre class="usage"><span class='co'># S4 method for DrillDriver</span>
<span class='fu'>dbUnloadDriver</span>(<span class='no'>drv</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drv</th>
<td><p>driver</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Extra optional parameters</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

143
docs/reference/Drill.html

@ -0,0 +1,143 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drill — Drill • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Drill</h1>
</div>
<p>Drill</p>
<p>Connect to Drill</p>
<pre class="usage"><span class='fu'>Drill</span>()
<span class='co'># S4 method for DrillDriver</span>
<span class='fu'>dbConnect</span>(<span class='no'>drv</span>, <span class='kw'>host</span> <span class='kw'>=</span> <span class='st'>"localhost"</span>, <span class='kw'>port</span> <span class='kw'>=</span> <span class='fl'>8047L</span>,
<span class='kw'>ssl</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drv</th>
<td><p>An object created by <code>Drill()</code></p></td>
</tr>
<tr>
<th>host</th>
<td><p>host</p></td>
</tr>
<tr>
<th>port</th>
<td><p>port</p></td>
</tr>
<tr>
<th>ssl</th>
<td><p>use ssl?</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Extra optional parameters</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

120
docs/reference/DrillConnection-class.html

@ -0,0 +1,120 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drill connection class. — DrillConnection-class • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Drill connection class.</h1>
</div>
<p>Drill connection class.</p>
<p>Send a query to Drill</p>
<pre class="usage"><span class='co'># S4 method for DrillConnection</span>
<span class='fu'>dbSendQuery</span>(<span class='no'>conn</span>, <span class='no'>statement</span>, <span class='no'>...</span>)
<span class='co'># S4 method for DrillConnection</span>
<span class='fu'>dbIsValid</span>(<span class='no'>dbObj</span>, <span class='no'>...</span>)
<span class='co'># S4 method for DrillConnection,character</span>
<span class='fu'>dbListFields</span>(<span class='no'>conn</span>, <span class='no'>name</span>, <span class='no'>...</span>)</pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

111
docs/reference/DrillDriver-class.html

@ -0,0 +1,111 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Driver for Drill database. — DrillDriver-class • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Driver for Drill database.</h1>
</div>
<p>Driver for Drill database.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

139
docs/reference/DrillResult-class.html

@ -0,0 +1,139 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drill results class. — DrillResult-class • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Drill results class.</h1>
</div>
<p>Drill results class.</p>
<p>Clear</p>
<p>Retrieve records from Drill query</p>
<p>Completed</p>
<p>Statement</p>
<pre class="usage"><span class='co'># S4 method for DrillResult</span>
<span class='fu'>dbClearResult</span>(<span class='no'>res</span>, <span class='no'>...</span>)
<span class='co'># S4 method for DrillResult</span>
<span class='fu'>dbFetch</span>(<span class='no'>res</span>, <span class='kw'>.progress</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
<span class='co'># S4 method for DrillResult</span>
<span class='fu'>dbHasCompleted</span>(<span class='no'>res</span>, <span class='no'>...</span>)
<span class='co'># S4 method for DrillResult,missing</span>
<span class='fu'>dbListFields</span>(<span class='no'>conn</span>, <span class='no'>name</span>)
<span class='co'># S4 method for DrillResult</span>
<span class='fu'>dbGetStatement</span>(<span class='no'>res</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>.progress</th>
<td><p>show data transfer progress?</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

131
docs/reference/dbDataType-DrillConnection-method.html

@ -0,0 +1,131 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drill dbDataType — dbDataType,DrillConnection-method • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Drill dbDataType</h1>
</div>
<p>Drill dbDataType</p>
<pre class="usage"><span class='co'># S4 method for DrillConnection</span>
<span class='fu'>dbDataType</span>(<span class='no'>dbObj</span>, <span class='no'>obj</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>dbObj</th>
<td><p>A <code><a href='DrillDriver-class.html'>DrillDriver</a></code> object</p></td>
</tr>
<tr>
<th>obj</th>
<td><p>Any R object</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Extra optional parameters</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

128
docs/reference/drill_active.html

@ -0,0 +1,128 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test whether Drill HTTP REST API server is up — drill_active • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Test whether Drill HTTP REST API server is up</h1>
</div>
<p>This is a very simple test (performs <code>HEAD /</code> request on the Drill server/cluster)</p>
<pre class="usage"><span class='fu'>drill_active</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_active</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

132
docs/reference/drill_cancel.html

@ -0,0 +1,132 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cancel the query that has the given queryid — drill_cancel • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Cancel the query that has the given queryid</h1>
</div>
<p>Cancel the query that has the given queryid</p>
<pre class="usage"><span class='fu'>drill_cancel</span>(<span class='no'>drill_con</span>, <span class='no'>query_id</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>query_id</th>
<td><p>the UUID of the query in standard UUID format that Drill assigns to each query.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

143
docs/reference/drill_connection.html

@ -0,0 +1,143 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Setup a Drill connection — drill_connection • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Setup a Drill connection</h1>
</div>
<p>Setup a Drill connection</p>
<pre class="usage"><span class='fu'>drill_connection</span>(<span class='kw'>host</span> <span class='kw'>=</span> <span class='fu'>Sys.getenv</span>(<span class='st'>"DRILL_HOST"</span>, <span class='st'>"localhost"</span>),
<span class='kw'>port</span> <span class='kw'>=</span> <span class='fu'>Sys.getenv</span>(<span class='st'>"DRILL_PORT"</span>, <span class='fl'>8047</span>), <span class='kw'>ssl</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>user</span> <span class='kw'>=</span> <span class='fu'>Sys.getenv</span>(<span class='st'>"DRILL_USER"</span>, <span class='st'>""</span>),
<span class='kw'>password</span> <span class='kw'>=</span> <span class='fu'>Sys.getenv</span>(<span class='st'>"DRILL_PASSWORD"</span>, <span class='st'>""</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>host</th>
<td><p>Drill host (will pick up the value from <code>DRILL_HOST</code> env var)</p></td>
</tr>
<tr>
<th>port</th>
<td><p>Drill port (will pick up the value from <code>DRILL_PORT</code> env var)</p></td>
</tr>
<tr>
<th>ssl</th>
<td><p>use ssl?</p></td>
</tr>
<tr>
<th>user, password</th>
<td><p>NOT IMPLEMENTED YET credentials for username/password auth.
(will pick up the values from <code>DRILL_USER</code>/<code>DRILL_PASSWORD</code>
env vars)</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>dc</span> <span class='kw'>&lt;-</span> <span class='fu'>drill_connection</span>()</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

165
docs/reference/drill_custom_functions.html

@ -0,0 +1,165 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drill expressions / custom functions <code>dplyr</code> translation: — drill_custom_functions • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Drill expressions / custom functions <code>dplyr</code> translation:</h1>
</div>
<ul>
<li><p><code>as.character(x)</code> : <code>CAST( x AS CHARACTER)</code></p></li>
<li><p><code>as.date(x)</code> : <code>CAST( x AS DATE)</code></p></li>
<li><p><code>as.logical(x)</code> : <code>CAST( x AS BOOLEAN)</code></p></li>
<li><p><code>as.numeric(x)</code> : <code>CAST( x AS DOUBLE)</code></p></li>
<li><p><code>as.posixct(x)</code> : <code>CAST( x AS TIMESTAMP)</code></p></li>
<li><p><code>binary_string(x)</code> : <code>BINARY_STRING( x )</code></p></li>
<li><p><code>cbrt(x)</code> : <code>CBRT( x )</code></p></li>
<li><p><code>char_to_timestamp(x, y)</code> : <code>TO_TIMESTAMP( x, y )</code></p></li>
<li><p><code>contains(x, y)</code> : <code>CONTAINS x, y )</code></p></li>
<li><p><code>convert_to(x, y)</code> : <code>CONVERT_TO( x, y )</code></p></li>
<li><p><code>convert_from(x, y)</code> : <code>CONVERT_FROM( x, y )</code></p></li>
<li><p><code>degrees(x)</code> : <code>DEGREES( x )</code></p></li>
<li><p><code>lshift(x, y)</code> : <code>DEGREES( x, y )</code></p></li>
<li><p><code>negative(x)</code> : <code>NEGATIVE( x )</code></p></li>
<li><p><code>pow(x, y)</code> : <code>MOD( x, y )</code></p></li>
<li><p><code>sql_prefix(x, y)</code> : <code>POW( x, y )</code></p></li>
<li><p><code>string_binary(x)</code> : <code>STRING_BINARY( x )</code></p></li>
<li><p><code>radians(x)</code> : <code>RADIANS( x )</code></p></li>
<li><p><code>rshift(x)</code> : <code>RSHIFT( x )</code></p></li>
<li><p><code>to_char(x, y)</code> : <code>TO_CHAR x, y )</code></p></li>
<li><p><code>to_date(x, y)</code> : <code>TO_DATE( x, y )</code></p></li>
<li><p><code>to_number(x, y)</code> : <code>TO_NUMBER( x, y )</code></p></li>
<li><p><code>trunc(x)</code> : <code>TRUNC( x )</code></p></li>
</ul>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>I'll get these converted into ^^ format:</p><ul>
<li><p><code>double_to_timestamp</code> = <code>sql_prefix("TO_TIMESTAMP", 1),</code></p></li>
<li><p><code>char_length</code> = <code>sql_prefix("CHAR_LENGTH", 1),</code></p></li>
<li><p><code>flatten</code> = <code>sql_prefix("FLATTEN", 1),</code></p></li>
<li><p><code>kvgen</code> = <code>sql_prefix("KVGEN", 1),</code></p></li>
<li><p><code>repeated_count</code> = <code>sql_prefix("REPEATED_COUNT", 1),</code></p></li>
<li><p><code>repeated_contains</code> = <code>sql_prefix("REPEATED_CONTAINS", 1),</code></p></li>
<li><p><code>ilike</code> = <code>sql_prefix("ILIKE", 2),</code></p></li>
<li><p><code>init_cap</code> = <code>sql_prefix("INIT_CAP", 1),</code></p></li>
<li><p><code>length</code> = <code>sql_prefix("LENGTH", 1),</code></p></li>
<li><p><code>lower</code> = <code>sql_prefix("LOWER", 1),</code></p></li>
<li><p><code>ltrim</code> = <code>sql_prefix("LTRIM", 2),</code></p></li>
<li><p><code>nullif</code> = <code>sql_prefix("NULLIF", 2),</code></p></li>
<li><p><code>position</code> = <code>function(x, y) build_sql("POSITION(", x, " IN ", y, ")"),</code></p></li>
<li><p><code>regexp_replace</code> = <code>sql_prefix("REGEXP_REPLACE", 3),</code></p></li>
<li><p><code>rtrim</code> = <code>sql_prefix("RTRIM", 2),</code></p></li>
<li><p><code>rpad</code> = <code>sql_prefix("RPAD", 2),</code></p></li>
<li><p><code>rpad_with</code> = <code>sql_prefix("RPAD", 3),</code></p></li>
<li><p><code>lpad</code> = <code>sql_prefix("LPAD", 2),</code></p></li>
<li><p><code>lpad_with</code> = <code>sql_prefix("LPAD", 3),</code></p></li>
<li><p><code>strpos</code> = <code>sql_prefix("STRPOS", 2),</code></p></li>
<li><p><code>substr</code> = <code>sql_prefix("SUBSTR", 3),</code></p></li>
<li><p><code>trim</code> = <code>function(x, y, z) build_sql("TRIM(", x, " ", y, " FROM ", z, ")"),</code></p></li>
<li><p><code>upper</code> = <code>sql_prefix("UPPER", 1)</code></p></li>
</ul>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#details">Details</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

166
docs/reference/drill_jdbc.html

@ -0,0 +1,166 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Connect to Drill using JDBC — drill_jdbc • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Connect to Drill using JDBC</h1>
</div>
<p>The DRILL JDBC driver fully-qualified path must be placed in the
<code>DRILL_JDBC_JAR</code> environment variable. This is best done via <code>~/.Renviron</code>
for interactive work. e.g. <code>DRILL_JDBC_JAR=/usr/local/drill/jars/jdbc-driver/drill-jdbc-all-1.10.0.jar</code></p>
<pre class="usage"><span class='fu'>drill_jdbc</span>(<span class='kw'>nodes</span> <span class='kw'>=</span> <span class='st'>"localhost:2181"</span>, <span class='kw'>cluster_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>schema</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>use_zk</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>nodes</th>
<td><p>character vector of nodes. If more than one node, you can either have
a single string with the comma-separated node:port pairs pre-made or
pass in a character vector with multiple node:port strings and the
function will make a comma-separated node string for you.</p></td>
</tr>
<tr>
<th>cluster_id</th>
<td><p>the cluster id from <code>drill-override.conf</code></p></td>
</tr>
<tr>
<th>schema</th>
<td><p>an optional schema name to append to the JDBC connection string</p></td>
</tr>
<tr>
<th>use_zk</th>
<td><p>are you connecting to a ZooKeeper instance (default: <code>TRUE</code>) or
connecting to an individual DrillBit.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>a JDBC connection object</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/using-the-jdbc-driver/#using-the-jdbc-url-for-a-random-drillbit-connection'>https://drill.apache.org/docs/using-the-jdbc-driver/#using-the-jdbc-url-for-a-random-drillbit-connection</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='no'>con</span> <span class='kw'>&lt;-</span> <span class='fu'>drill_jdbc</span>(<span class='st'>"localhost:2181"</span>, <span class='st'>"main"</span>)
<span class='fu'><a href='drill_query.html'>drill_query</a></span>(<span class='no'>con</span>, <span class='st'>"SELECT * FROM cp.`employee.json`"</span>)
<span class='co'># you can also use the connection with RJDBC calls:</span>
<span class='fu'>dbGetQuery</span>(<span class='no'>con</span>, <span class='st'>"SELECT * FROM cp.`employee.json`"</span>)
<span class='co'># for local/embedded mode with default configuration info</span>
<span class='no'>con</span> <span class='kw'>&lt;-</span> <span class='fu'>drill_jdbc</span>(<span class='st'>"localhost:31010"</span>, <span class='kw'>use_zk</span><span class='kw'>=</span><span class='fl'>FALSE</span>)
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

128
docs/reference/drill_metrics.html

@ -0,0 +1,128 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get the current memory metrics — drill_metrics • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get the current memory metrics</h1>
</div>
<p>Get the current memory metrics</p>
<pre class="usage"><span class='fu'>drill_metrics</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_metrics</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

138
docs/reference/drill_options.html

@ -0,0 +1,138 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>List the name, default, and data type of the system and session options — drill_options • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>List the name, default, and data type of the system and session options</h1>
</div>
<p>List the name, default, and data type of the system and session options</p>
<pre class="usage"><span class='fu'>drill_options</span>(<span class='no'>drill_con</span>, <span class='kw'>pattern</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>pattern</th>
<td><p>pattern to filter results by</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_options</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

132
docs/reference/drill_profile.html

@ -0,0 +1,132 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get the profile of the query that has the given queryid — drill_profile • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get the profile of the query that has the given queryid</h1>
</div>
<p>Get the profile of the query that has the given queryid</p>
<pre class="usage"><span class='fu'>drill_profile</span>(<span class='no'>drill_con</span>, <span class='no'>query_id</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>query_id</th>
<td><p>UUID of the query in standard UUID format that Drill assigns to each query</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

134
docs/reference/drill_profiles.html

@ -0,0 +1,134 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get the profiles of running and completed queries — drill_profiles • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get the profiles of running and completed queries</h1>
</div>
<p>Get the profiles of running and completed queries</p>
<pre class="usage"><span class='fu'>drill_profiles</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_profiles</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

155
docs/reference/drill_query.html

@ -0,0 +1,155 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Submit a query and return results — drill_query • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Submit a query and return results</h1>
</div>
<p>This function can handle REST API connections or JDBC connections. There is a benefit to
calling this function for JDBC connections vs a straight call to <code>dbGetQuery()</code> in
that the function result is a `tbl_df` vs a plain <code>data.frame</code> so you get better
default printing (which can be helpful if you accidentally execute a query and the result
set is huge).</p>
<pre class="usage"><span class='fu'>drill_query</span>(<span class='no'>drill_con</span>, <span class='no'>query</span>, <span class='kw'>uplift</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>.progress</span> <span class='kw'>=</span> <span class='fu'>interactive</span>())</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code> or
<code>drill_jdbc()</code>)</p></td>
</tr>
<tr>
<th>query</th>
<td><p>query to run</p></td>
</tr>
<tr>
<th>uplift</th>
<td><p>automatically run <code>drill_uplift()</code> on the result? (default: <code>TRUE</code>,
ignored if <code>drill_con</code> is a <code>JDBCConnection</code> created by
<code>drill_jdbc()</code>)</p></td>
</tr>
<tr>
<th>.progress</th>
<td><p>if <code>TRUE</code> (default if in an interactive session) then ask
<code>httr::POST</code> to display a progress bar</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span>
<span class='fu'>drill_query</span>(<span class='st'>"SELECT * FROM cp.`employee.json` limit 5"</span>)
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

157
docs/reference/drill_set.html

@ -0,0 +1,157 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Set Drill SYSTEM or SESSION options — drill_set • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Set Drill SYSTEM or SESSION options</h1>
</div>
<p>Helper function to make it more R-like to set Drill SESSION or SYSTEM optons. It
handles the conversion of R types (like <code>TRUE</code>) to SQL types and automatically
quotes parameter values (when necessary).</p>
<pre class="usage"><span class='fu'>drill_set</span>(<span class='no'>drill_con</span>, <span class='no'>...</span>, <span class='kw'>type</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"session"</span>, <span class='st'>"system"</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>...</th>
<td><p>named parameters to be sent to ALTER [SYSTEM|SESSION]</p></td>
</tr>
<tr>
<th>type</th>
<td><p>set the <code>session</code> or <code>system</code> parameter</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>a <code>tbl</code> (invisibly) with the <code>ALTER</code> queries sent and results, including errors.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>If any query errors result, error messages will be presented to the console.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span>
<span class='fu'>drill_set</span>(<span class='kw'>exec.errors.verbose</span><span class='kw'>=</span><span class='fl'>TRUE</span>, <span class='kw'>store.format</span><span class='kw'>=</span><span class='st'>"parquet"</span>, <span class='kw'>web.logs.max_lines</span><span class='kw'>=</span><span class='fl'>20000</span>)
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

138
docs/reference/drill_settings_reset.html

@ -0,0 +1,138 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changes (optionally, all) session settings back to system defaults — drill_settings_reset • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Changes (optionally, all) session settings back to system defaults</h1>
</div>
<p>Changes (optionally, all) session settings back to system defaults</p>
<pre class="usage"><span class='fu'>drill_settings_reset</span>(<span class='no'>drill_con</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>...</th>
<td><p>bare name of system options to reset</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_settings_reset</span>(<span class='no'>exec.errors.verbose</span>)
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

138
docs/reference/drill_show_files.html

@ -0,0 +1,138 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Show files in a file system schema. — drill_show_files • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Show files in a file system schema.</h1>
</div>
<p>Show files in a file system schema.</p>
<pre class="usage"><span class='fu'>drill_show_files</span>(<span class='no'>drill_con</span>, <span class='no'>schema_spec</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>schema_spec</th>
<td><p>properly quoted "filesystem.directory_name" reference path</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_show_files</span>(<span class='st'>"dfs.tmp"</span>)
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

128
docs/reference/drill_show_schemas.html

@ -0,0 +1,128 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Returns a list of available schemas. — drill_show_schemas • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Returns a list of available schemas.</h1>
</div>
<p>Returns a list of available schemas.</p>
<pre class="usage"><span class='fu'>drill_show_schemas</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

134
docs/reference/drill_stats.html

@ -0,0 +1,134 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get Drillbit information, such as ports numbers — drill_stats • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get Drillbit information, such as ports numbers</h1>
</div>
<p>Get Drillbit information, such as ports numbers</p>
<pre class="usage"><span class='fu'>drill_stats</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_stats</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

134
docs/reference/drill_status.html

@ -0,0 +1,134 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get the status of Drill — drill_status • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get the status of Drill</h1>
</div>
<p>Get the status of Drill</p>
<pre class="usage"><span class='fu'>drill_status</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>The output of this is in a "viewer" window</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_status</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#note">Note</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

138
docs/reference/drill_storage.html

@ -0,0 +1,138 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get the list of storage plugin names and configurations — drill_storage • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get the list of storage plugin names and configurations</h1>
</div>
<p>Get the list of storage plugin names and configurations</p>
<pre class="usage"><span class='fu'>drill_storage</span>(<span class='no'>drill_con</span>, <span class='kw'>plugin</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>plugin</th>
<td><p>the assigned name in the storage plugin definition.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_storage</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

142
docs/reference/drill_system_reset.html

@ -0,0 +1,142 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changes (optionally, all) system settings back to system defaults — drill_system_reset • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Changes (optionally, all) system settings back to system defaults</h1>
</div>
<p>Changes (optionally, all) system settings back to system defaults</p>
<pre class="usage"><span class='fu'>drill_system_reset</span>(<span class='no'>drill_con</span>, <span class='no'>...</span>, <span class='kw'>all</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>...</th>
<td><p>bare name of system options to reset</p></td>
</tr>
<tr>
<th>all</th>
<td><p>if <code>TRUE</code>, all parameters are reset (<code>...</code> is ignored)</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_system_reset</span>(<span class='kw'>all</span><span class='kw'>=</span><span class='fl'>TRUE</span>)
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

134
docs/reference/drill_threads.html

@ -0,0 +1,134 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get information about threads — drill_threads • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Get information about threads</h1>
</div>
<p>Get information about threads</p>
<pre class="usage"><span class='fu'>drill_threads</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>The output of this is in a "viewer" window</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_threads</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#note">Note</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

137
docs/reference/drill_uplift.html

@ -0,0 +1,137 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Turn columnar query results into a type-converted tbl — drill_uplift • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Turn columnar query results into a type-converted tbl</h1>
</div>
<p>If you know the result of `drill_query()` will be a data frame, then
you can pipe it to this function to pull out `rows` and automatically
type-convert it.</p>
<pre class="usage"><span class='fu'>drill_uplift</span>(<span class='no'>query_result</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>query_result</th>
<td><p>the result of a call to `drill_query()`</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Not really intended to be called directly, but useful if you accidentally ran
<code>drill_query()</code> without `uplift=TRUE` but want to then convert the structure.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

133
docs/reference/drill_use.html

@ -0,0 +1,133 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Change to a particular schema. — drill_use • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Change to a particular schema.</h1>
</div>
<p>Change to a particular schema.</p>
<pre class="usage"><span class='fu'>drill_use</span>(<span class='no'>drill_con</span>, <span class='no'>schema_name</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
<tr>
<th>schema_name</th>
<td><p>A unique name for a Drill schema. A schema in Drill is a configured
storage plugin, such as hive, or a storage plugin and workspace.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

134
docs/reference/drill_version.html

@ -0,0 +1,134 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Identify the version of Drill running — drill_version • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Identify the version of Drill running</h1>
</div>
<p>Identify the version of Drill running</p>
<pre class="usage"><span class='fu'>drill_version</span>(<span class='no'>drill_con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>drill_con</th>
<td><p>drill server connection object setup by <code>drill_connection()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='fu'><a href='drill_connection.html'>drill_connection</a></span>() <span class='kw'>%&gt;%</span> <span class='fu'>drill_version</span>()
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#references">References</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

296
docs/reference/index.html

@ -0,0 +1,296 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Function reference • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-index">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9">
<div class="page-header">
<h1>
Reference
<small>version&nbsp;0.5.0</small>
</h1>
</div>
<div class="contents">
<table class="ref-index">
<colgroup>
<col class="alias" />
<col class="title" />
</colgroup>
<tbody>
<tr>
<th colspan="2">
<h2 id="section-all-functions" class="hasAnchor"><a href="#section-all-functions" class="anchor"></a>All functions</h2>
<p class="section-desc"></p>
</th>
</tr>
<tr>
<!-- -->
<td>
<p><code><a href="dbDataType-DrillConnection-method.html">dbDataType</a></code> </p>
</td>
<td><p>Drill dbDataType</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="DrilDriver-class.html">dbUnloadDriver</a></code> </p>
</td>
<td><p>Unload driver</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_active.html">drill_active</a></code> </p>
</td>
<td><p>Test whether Drill HTTP REST API server is up</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_cancel.html">drill_cancel</a></code> </p>
</td>
<td><p>Cancel the query that has the given queryid</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_connection.html">drill_connection</a></code> </p>
</td>
<td><p>Setup a Drill connection</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_custom_functions.html">drill_custom_functions</a></code> </p>
</td>
<td><p>Drill expressions / custom functions <code>dplyr</code> translation:</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_jdbc.html">drill_jdbc</a></code> </p>
</td>
<td><p>Connect to Drill using JDBC</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_metrics.html">drill_metrics</a></code> </p>
</td>
<td><p>Get the current memory metrics</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_options.html">drill_options</a></code> </p>
</td>
<td><p>List the name, default, and data type of the system and session options</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_profile.html">drill_profile</a></code> </p>
</td>
<td><p>Get the profile of the query that has the given queryid</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_profiles.html">drill_profiles</a></code> </p>
</td>
<td><p>Get the profiles of running and completed queries</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_query.html">drill_query</a></code> </p>
</td>
<td><p>Submit a query and return results</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_set.html">drill_set</a></code> </p>
</td>
<td><p>Set Drill SYSTEM or SESSION options</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_settings_reset.html">drill_settings_reset</a></code> </p>
</td>
<td><p>Changes (optionally, all) session settings back to system defaults</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_show_files.html">drill_show_files</a></code> </p>
</td>
<td><p>Show files in a file system schema.</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_show_schemas.html">drill_show_schemas</a></code> </p>
</td>
<td><p>Returns a list of available schemas.</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_stats.html">drill_stats</a></code> </p>
</td>
<td><p>Get Drillbit information, such as ports numbers</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_status.html">drill_status</a></code> </p>
</td>
<td><p>Get the status of Drill</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_storage.html">drill_storage</a></code> </p>
</td>
<td><p>Get the list of storage plugin names and configurations</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_system_reset.html">drill_system_reset</a></code> </p>
</td>
<td><p>Changes (optionally, all) system settings back to system defaults</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_threads.html">drill_threads</a></code> </p>
</td>
<td><p>Get information about threads</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_uplift.html">drill_uplift</a></code> </p>
</td>
<td><p>Turn columnar query results into a type-converted tbl</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_use.html">drill_use</a></code> </p>
</td>
<td><p>Change to a particular schema.</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drill_version.html">drill_version</a></code> </p>
</td>
<td><p>Identify the version of Drill running</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="Drill.html">Drill</a></code> <code><a href="Drill.html">dbConnect</a></code> </p>
</td>
<td><p>Drill</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="sergeant-exports.html">sergeant-exports</a></code> </p>
</td>
<td><p>sergeant exported operators</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="sergeant.html">sergeant</a></code> </p>
</td>
<td><p>Tools to Transform and Query Data with 'Apache' 'Drill'</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="src_drill.html">src_drill</a></code> <code><a href="src_drill.html">tbl</a></code> </p>
</td>
<td><p>Connect to Drill (dplyr)</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#section-all-functions">All functions</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

113
docs/reference/sergeant-exports.html

@ -0,0 +1,113 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>sergeant exported operators — sergeant-exports • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>sergeant exported operators</h1>
</div>
<p>The following functions are imported and then re-exported
from the sergeant package to enable use of the magrittr
pipe operator with no additional library calls</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

146
docs/reference/sergeant.html

@ -0,0 +1,146 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tools to Transform and Query Data with 'Apache' 'Drill' — sergeant • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Tools to Transform and Query Data with 'Apache' 'Drill'</h1>
</div>
<p>Drill is an innovative low-latency distributed query engine designed to enable data
exploration and analytics on both relational and non-relational datastores, scaling to
petabytes of data. Users can query the data using standard SQL and BI tools without
having to create and manage schemas. Some of the key features are:</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<ul>
<li><p>Schema-free JSON document model similar to MongoDB and Elasticsearch</p></li>
<li><p>Industry-standard APIs: ANSI SQL, ODBC/JDBC, RESTful APIs</p></li>
<li><p>Extremely user and developer friendly</p></li>
<li><p>Pluggable architecture enables connectivity to multiple datastores</p></li>
</ul>
<p>Drill includes a distributed execution environment, purpose built for large-scale data
processing. At the core of Drill is the "Drillbit" service which is responsible for
accepting requests from the client, processing the queries, and returning results to
the client.</p>
<p>You can install and run a Drillbit service on one node or on many nodes to form a
distributed cluster environment. When a Drillbit runs on each data node in a cluster,
Drill can maximize data locality during query execution without moving data over the
network or between nodes. Drill uses ZooKeeper to maintain cluster membership and health
check information.</p>
<p>Methods are provided to work with Drill via the native JDBC &amp; REST APIs along with R
<code>DBI</code> and <code>dplyr</code> interfaces.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p><a href = 'https://drill.apache.org/docs/'>Drill documentation</a></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#details">Details</a></li>
<li><a href="#references">References</a></li>
</ul>
<h2>Author</h2>
Bob Rudis (bob@rud.is)
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

178
docs/reference/src_drill.html

@ -0,0 +1,178 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Connect to Drill (dplyr) — src_drill • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Connect to Drill (dplyr)</h1>
</div>
<p>Use <code>src_drill()</code> to connect to a Drill cluster and `tbl()` to connect to a
fully-qualified "table reference". The vast majority of Drill SQL functions have
also been made available to the <code>dplyr</code> interface. If you have custom Drill
SQL functions that need to be implemented please file an issue on GitHub.</p>
<pre class="usage"><span class='fu'>src_drill</span>(<span class='kw'>host</span> <span class='kw'>=</span> <span class='fu'>Sys.getenv</span>(<span class='st'>"DRILL_HOST"</span>, <span class='st'>"localhost"</span>),
<span class='kw'>port</span> <span class='kw'>=</span> <span class='fu'>as.integer</span>(<span class='fu'>Sys.getenv</span>(<span class='st'>"DRILL_PORT"</span>, <span class='fl'>8047L</span>)), <span class='kw'>ssl</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='co'># S3 method for src_drill</span>
<span class='fu'>tbl</span>(<span class='no'>src</span>, <span class='no'>from</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>host</th>
<td><p>Drill host (will pick up the value from <code>DRILL_HOST</code> env var)</p></td>
</tr>
<tr>
<th>port</th>
<td><p>Drill port (will pick up the value from <code>DRILL_PORT</code> env var)</p></td>
</tr>
<tr>
<th>ssl</th>
<td><p>use ssl?</p></td>
</tr>
<tr>
<th>src</th>
<td><p>A Drill "src" created with <code>src_drill()</code></p></td>
</tr>
<tr>
<th>from</th>
<td><p>A Drill view or table specification</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Extra parameters</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>This is a DBI wrapper around the Drill REST API. TODO username/password support</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>not_run</span>({
<span class='no'>db</span> <span class='kw'>&lt;-</span> <span class='fu'>src_drill</span>(<span class='st'>"localhost"</span>, <span class='st'>"8047"</span>)
<span class='fu'>print</span>(<span class='no'>db</span>)
<span class='no'>emp</span> <span class='kw'>&lt;-</span> <span class='fu'>tbl</span>(<span class='no'>db</span>, <span class='st'>"cp.`employee.json`"</span>)
<span class='fu'>count</span>(<span class='no'>emp</span>, <span class='no'>gender</span>, <span class='no'>marital_status</span>)
<span class='co'># Drill-specific SQL functions are also available</span>
<span class='fu'>select</span>(<span class='no'>emp</span>, <span class='no'>full_name</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>mutate</span>( <span class='kw'>loc</span> <span class='kw'>=</span> <span class='fu'>strpos</span>(<span class='no'>full_name</span>, <span class='st'>"a"</span>),
<span class='kw'>first_three</span> <span class='kw'>=</span> <span class='fu'>substr</span>(<span class='no'>full_name</span>, <span class='fl'>1L</span>, <span class='fl'>3L</span>),
<span class='kw'>len</span> <span class='kw'>=</span> <span class='fu'>length</span>(<span class='no'>full_name</span>),
<span class='kw'>rx</span> <span class='kw'>=</span> <span class='fu'>regexp_replace</span>(<span class='no'>full_name</span>, <span class='st'>"[aeiouAEIOU]"</span>, <span class='st'>"*"</span>),
<span class='kw'>rnd</span> <span class='kw'>=</span> <span class='fu'>rand</span>(),
<span class='kw'>pos</span> <span class='kw'>=</span> <span class='fu'>position</span>(<span class='st'>"en"</span>, <span class='no'>full_name</span>),
<span class='kw'>rpd</span> <span class='kw'>=</span> <span class='fu'>rpad</span>(<span class='no'>full_name</span>, <span class='fl'>20L</span>),
<span class='kw'>rpdw</span> <span class='kw'>=</span> <span class='fu'>rpad_with</span>(<span class='no'>full_name</span>, <span class='fl'>20L</span>, <span class='st'>"*"</span>))
})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#note">Note</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

144
docs/reference/src_tbls.html

@ -0,0 +1,144 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>src tbls — src_tbls.src_drill • sergeant</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">sergeant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/hrbrmstr/sergeant">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>src tbls</h1>
</div>
<p>"SHOW DATABASES"</p>
<pre class="usage"><span class='co'># S3 method for src_drill</span>
<span class='fu'>src_tbls</span>(<span class='no'>x</span>)
<span class='co'># S3 method for src_drill</span>
<span class='fu'>db_desc</span>(<span class='no'>x</span>)
<span class='co'># S3 method for DrillConnection</span>
<span class='fu'>sql_escape_ident</span>(<span class='no'>con</span>, <span class='no'>x</span>)
<span class='co'># S3 method for src_drill</span>
<span class='fu'>copy_to</span>(<span class='no'>dest</span>, <span class='no'>df</span>, <span class='no'>name</span>, <span class='no'>overwrite</span>, <span class='no'>...</span>)
<span class='co'># S3 method for DrillConnection</span>
<span class='fu'>db_explain</span>(<span class='no'>con</span>, <span class='no'>sql</span>, <span class='no'>...</span>)
<span class='co'># S3 method for DrillConnection</span>
<span class='fu'>db_query_fields</span>(<span class='no'>con</span>, <span class='no'>sql</span>, <span class='no'>...</span>)
<span class='co'># S3 method for DrillConnection</span>
<span class='fu'>db_data_type</span>(<span class='no'>con</span>, <span class='no'>fields</span>, <span class='no'>...</span>)
<span class='co'># S3 method for DrillConnection</span>
<span class='fu'>sql_translate_env</span>(<span class='no'>con</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>x</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

BIN
inst/java/slf4j-nop-1.7.25.jar

Binary file not shown.

18
man/DrillJDBC.Rd

@ -0,0 +1,18 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\name{DrillJDBC}
\alias{DrillJDBC}
\title{Drill's JDBC driver main class loader}
\usage{
DrillJDBC()
}
\description{
Drill's JDBC driver main class loader
}
\seealso{
Other Drill JDBC API: \code{\link{dbConnect,DrillJDBCDriver-method}},
\code{\link{dbDataType,DrillJDBCConnection-method}},
\code{\link{db_data_type.DrillJDBCConnection}},
\code{\link{drill_jdbc}}
}
\concept{Drill JDBC API}

10
man/DrillJDBCConnection-class.Rd

@ -0,0 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{class}
\name{DrillJDBCConnection-class}
\alias{DrillJDBCConnection-class}
\title{Drill JDBC connection class.}
\description{
Drill JDBC connection class.
}
\keyword{internal}

10
man/DrillJDBCDriver-class.Rd

@ -0,0 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{class}
\name{DrillJDBCDriver-class}
\alias{DrillJDBCDriver-class}
\title{JDBC Driver for Drill database.}
\description{
JDBC Driver for Drill database.
}
\keyword{internal}

31
man/dbConnect-DrillJDBCDriver-method.Rd

@ -0,0 +1,31 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbConnect,DrillJDBCDriver-method}
\alias{dbConnect,DrillJDBCDriver-method}
\title{Connect to Drill JDBC with your own connection string}
\usage{
\S4method{dbConnect}{DrillJDBCDriver}(drv, url, user = "", password = "",
...)
}
\arguments{
\item{drv}{what you get back from \code{\link[=DrillJDBC]{DrillJDBC()}}}
\item{url}{your Drill connection strinfg}
\item{user, password}{username & password (leave as-is for no-auth)}
\item{...}{additional \code{name=val} properties which will be set with Java's
\code{SetProperty} method.}
}
\description{
You should really use \code{\link[=drill_jdbc]{drill_jdbc()}} as it handles some cruft for
you, but you can specify the full JDBC connection string
}
\seealso{
Other Drill JDBC API: \code{\link{DrillJDBC}},
\code{\link{dbDataType,DrillJDBCConnection-method}},
\code{\link{db_data_type.DrillJDBCConnection}},
\code{\link{drill_jdbc}}
}
\concept{Drill JDBC API}

26
man/dbDataType-DrillJDBCConnection-method.Rd

@ -0,0 +1,26 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{methods}
\name{dbDataType,DrillJDBCConnection-method}
\alias{dbDataType,DrillJDBCConnection-method}
\title{Drill JDBC dbDataType}
\usage{
\S4method{dbDataType}{DrillJDBCConnection}(dbObj, obj, ...)
}
\arguments{
\item{dbObj}{A \code{\linkS4class{DrillJDBCDriver}} object}
\item{obj}{Any R object}
\item{...}{Extra optional parameters}
}
\description{
Drill JDBC dbDataType
}
\seealso{
Other Drill JDBC API: \code{\link{DrillJDBC}},
\code{\link{dbConnect,DrillJDBCDriver-method}},
\code{\link{db_data_type.DrillJDBCConnection}},
\code{\link{drill_jdbc}}
}
\concept{Drill JDBC API}

79
man/drill_jdbc.Rd

@ -0,0 +1,79 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\name{drill_jdbc}
\alias{drill_jdbc}
\alias{src_drill_jdbc}
\alias{tbl.src_drill_jdbc}
\title{Connect to Drill using JDBC}
\usage{
drill_jdbc(nodes = "localhost:2181", cluster_id = NULL, schema = NULL,
use_zk = TRUE)
src_drill_jdbc(nodes = "localhost:2181", cluster_id = NULL, schema = NULL,
use_zk = TRUE)
\method{tbl}{src_drill_jdbc}(src, from, ...)
}
\arguments{
\item{nodes}{character vector of nodes. If more than one node, you can either have
a single string with the comma-separated node:port pairs pre-made or
pass in a character vector with multiple node:port strings and the
function will make a comma-separated node string for you.}
\item{cluster_id}{the cluster id from \code{drill-override.conf}}
\item{schema}{an optional schema name to append to the JDBC connection string}
\item{use_zk}{are you connecting to a ZooKeeper instance (default: \code{TRUE}) or
connecting to an individual DrillBit.}
\item{src}{A Drill "src" created with \code{src_drill()}}
\item{from}{A Drill view or table specification}
\item{...}{Extra parameters}
}
\value{
a JDBC connection object
}
\description{
The DRILL JDBC driver fully-qualified path must be placed in the
\code{DRILL_JDBC_JAR} environment variable. This is best done via \code{~/.Renviron}
for interactive work. e.g. \code{DRILL_JDBC_JAR=/usr/local/drill/jars/jdbc-driver/drill-jdbc-all-1.10.0.jar}
}
\details{
[src_drill_jdbc()] wraps the JDBC [dbConnect()] connection instantation in
[dbplyr::src_dbi()] to return the equivalent of the REST driver's [src_drill()].
}
\examples{
\dontrun{
con <- drill_jdbc("localhost:2181", "main")
drill_query(con, "SELECT * FROM cp.`employee.json`")
# you can also use the connection with RJDBC calls:
dbGetQuery(con, "SELECT * FROM cp.`employee.json`")
# for local/embedded mode with default configuration info
con <- drill_jdbc("localhost:31010", use_zk=FALSE)
}
}
\references{
\url{https://drill.apache.org/docs/using-the-jdbc-driver/#using-the-jdbc-url-for-a-random-drillbit-connection}
}
\seealso{
Other Drill JDBC API: \code{\link{DrillJDBC}},
\code{\link{dbConnect,DrillJDBCDriver-method}},
\code{\link{dbDataType,DrillJDBCConnection-method}},
\code{\link{db_data_type.DrillJDBCConnection}}
Other Drill JDBC API: \code{\link{DrillJDBC}},
\code{\link{dbConnect,DrillJDBCDriver-method}},
\code{\link{dbDataType,DrillJDBCConnection-method}},
\code{\link{db_data_type.DrillJDBCConnection}}
Other Drill JDBC API: \code{\link{DrillJDBC}},
\code{\link{dbConnect,DrillJDBCDriver-method}},
\code{\link{dbDataType,DrillJDBCConnection-method}},
\code{\link{db_data_type.DrillJDBCConnection}}
}
\concept{Drill JDBC API}

40
man/drill_jdbc_internals.Rd

@ -0,0 +1,40 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jdbc.r
\docType{class}
\name{db_data_type.DrillJDBCConnection}
\alias{db_data_type.DrillJDBCConnection}
\alias{db_data_type.tbl_drill_jdbc}
\alias{DrillJDBCResult-class}
\alias{dbSendQuery,DrillJDBCConnection,character-method}
\alias{sql_escape_ident.DrillJDBCConnection}
\alias{sql_translate_env.DrillJDBCConnection}
\alias{src_tbls.src_dbi}
\title{Drill internals}
\usage{
\method{db_data_type}{DrillJDBCConnection}(con, fields, ...)
\method{db_data_type}{tbl_drill_jdbc}(con, fields, ...)
\S4method{dbSendQuery}{DrillJDBCConnection,character}(conn, statement, ...,
list = NULL)
\method{sql_escape_ident}{DrillJDBCConnection}(con, x)
\method{sql_translate_env}{DrillJDBCConnection}(con)
\method{src_tbls}{src_dbi}(x)
}
\arguments{
\item{x}{x}
}
\description{
"SHOW DATABASES"
}
\seealso{
Other Drill JDBC API: \code{\link{DrillJDBC}},
\code{\link{dbConnect,DrillJDBCDriver-method}},
\code{\link{dbDataType,DrillJDBCConnection-method}},
\code{\link{drill_jdbc}}
}
\concept{Drill JDBC API}
\keyword{internal}

12
man/sergeant-caffeinated-exports.Rd

@ -0,0 +1,12 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sergeant-caffeinated-package.r
\name{sergeant-caffeinated-exports}
\alias{sergeant-caffeinated-exports}
\alias{\%>\%}
\alias{tbl}
\title{sergeant exported operators}
\description{
The following functions are imported and then re-exported
from the sergeant package to enable use of the magrittr
pipe operator with no additional library calls
}

16
man/sergeant-caffeinated.Rd

@ -1,16 +0,0 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sergeant-caffeinated-package.R
\docType{package}
\name{sergeant-caffeinated}
\alias{sergeant-caffeinated}
\alias{sergeant-caffeinated-package}
\title{...}
\description{
\itemize{
\item URL: \url{https://gitlab.com/hrbrmstr/sergeant-caffeinated}
\item BugReports: \url{https://gitlab.com/hrbrmstr/sergeant-caffeinated/issues}
}
}
\author{
Bob Rudis (bob@rud.is)
}

41
man/sergeant.caffeinated.Rd

@ -0,0 +1,41 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sergeant-caffeinated-package.r
\docType{package}
\name{sergeant.caffeinated}
\alias{sergeant.caffeinated}
\alias{sergeant.caffeinated-package}
\title{Tools to Transform and Query Data with 'Apache' 'Drill'}
\description{
Drill is an innovative low-latency distributed query engine designed to enable data
exploration and analytics on both relational and non-relational datastores, scaling to
petabytes of data. Users can query the data using standard SQL and BI tools without
having to create and manage schemas. Some of the key features are:
}
\details{
\itemize{
\item{Schema-free JSON document model similar to MongoDB and Elasticsearch}
\item{Industry-standard APIs: ANSI SQL, ODBC/JDBC, RESTful APIs}
\item{Extremely user and developer friendly}
\item{Pluggable architecture enables connectivity to multiple datastores}
}
Drill includes a distributed execution environment, purpose built for large-scale data
processing. At the core of Drill is the "Drillbit" service which is responsible for
accepting requests from the client, processing the queries, and returning results to
the client.
You can install and run a Drillbit service on one node or on many nodes to form a
distributed cluster environment. When a Drillbit runs on each data node in a cluster,
Drill can maximize data locality during query execution without moving data over the
network or between nodes. Drill uses ZooKeeper to maintain cluster membership and health
check information.
Methods are provided to work with Drill via the native JDBC & REST APIs along with R
\code{DBI} and \code{dplyr} interfaces.
}
\references{
\href{https://drill.apache.org/docs/}{Drill documentation}
}
\author{
Bob Rudis (bob@rud.is)
}

7
sergeant-caffeinated.Rproj

@ -1,8 +1,9 @@
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default
QuitChildProcessesOnExit: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
@ -12,10 +13,12 @@ Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageBuildArgs: --resave-data
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace

BIN
sergeant.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

2
tests/test-all.R

@ -1,2 +0,0 @@
library(testthat)
test_check("sergeant-caffeinated")

5
tests/testthat.R

@ -0,0 +1,5 @@
library(dbplyr)
library(sergeant.caffeinated)
library(testthat)
test_check("sergeant.caffeinated")

6
tests/testthat/test-sergeant-caffeinated.R

@ -1,6 +0,0 @@
context("minimal package functionality")
test_that("we can do something", {
#expect_that(some_function(), is_a("data.frame"))
})

17
tests/testthat/test-sergeant.caffeinated.R

@ -0,0 +1,17 @@
test_host <- Sys.getenv("DRILL_TEST_HOST", "localhost")
context("JDBC")
test_that("Core dbplyr ops work", {
testthat::skip_on_cran()
db <- src_drill_jdbc(test_host)
expect_that(db, is_a("src_drill_jdbc"))
test_dplyr <- tbl(db, "cp.`employee.json`")
expect_that(test_dplyr, is_a("tbl"))
expect_that(dplyr::count(test_dplyr, gender), is_a("tbl"))
})
Loading…
Cancel
Save