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 dbGetQuery() in that the function result is a tbl_df vs a plain data.frame so you get better default printing (which can be helpful if you accidentally execute a query and the result set is huge).

drill_query(drill_con, query, uplift = TRUE, .progress = interactive())

Arguments

drill_con

drill server connection object setup by drill_connection() or drill_jdbc())

query

query to run

uplift

automatically run drill_uplift() on the result? (default: TRUE, ignored if drill_con is a JDBCConnection created by drill_jdbc())

.progress

if TRUE (default if in an interactive session) then ask httr::RETRY to display a progress bar

References

Drill documentation

See also

Examples

try({
drill_connection() %>%
  drill_query("SELECT * FROM cp.`employee.json` limit 5")
}, silent=TRUE)