Skip to content

Instantly share code, notes, and snippets.

View lucacerone's full-sized avatar

Luca Cerone lucacerone

View GitHub Profile
@lucacerone
lucacerone / impala.R
Created November 4, 2016 11:09 — forked from daroczig/impala.R
Connect and query Imapala via SSH and Impala-shell from R
#' Connect and query Imapala via SSH and Impala-shell
#' @param query SQL query to run
#' @param host server hostname or IP
#' @param log enable or disable logging of debug/trace messages
#' @return data.table object
#' @export
query_impala <- function(query, host = 'localhost', log = require(futile.logger)) {
## measure time of query
timer <- proc.time()