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
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 src_drill_jdbc tbl(src, from, ...)
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 |
schema | an optional schema name to append to the JDBC connection string |
use_zk | are you connecting to a ZooKeeper instance (default: |
src | A Drill "src" created with |
from | A Drill view or table specification |
... | Extra parameters |
a JDBC connection object
[src_drill_jdbc()] wraps the JDBC [dbConnect()] connection instantation in [dbplyr::src_dbi()] to return the equivalent of the REST driver's [src_drill()].
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
# 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) # }