drill_jdbc: Connect to Drill using JDBC

Description Usage Arguments Details Value References See Also Examples

Description

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. e.g. DRILL_JDBC_JAR=/usr/local/drill/jars/jdbc-driver/drill-jdbc-all-1.10.0.jar

Usage

1
2
3
4
5
6
7
8
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)

## S3 method for class 'src_drill_jdbc'
tbl(src, from, ...)

Arguments

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.

cluster_id

the cluster id from drill-override.conf

schema

an optional schema name to append to the JDBC connection string

use_zk

are you connecting to a ZooKeeper instance (default: TRUE) or connecting to an individual DrillBit.

src

A Drill "src" created with src_drill()

from

A Drill view or table specification

...

Extra parameters

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()].

Value

a JDBC connection object

References

https://drill.apache.org/docs/using-the-jdbc-driver/#using-the-jdbc-url-for-a-random-drillbit-connection

See Also

Other Drill JDBC API: DrillJDBC, dbConnect,DrillJDBCDriver-method, dbDataType,DrillJDBCConnection-method, db_data_type.DrillJDBCConnection

Other Drill JDBC API: DrillJDBC, dbConnect,DrillJDBCDriver-method, dbDataType,DrillJDBCConnection-method, db_data_type.DrillJDBCConnection

Other Drill JDBC API: DrillJDBC, dbConnect,DrillJDBCDriver-method, dbDataType,DrillJDBCConnection-method, db_data_type.DrillJDBCConnection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
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)

## End(Not run)

hrbrmstr/sergeant-caffeinated documentation built on May 10, 2019, 8:25 a.m.