drill_query: Submit a query and return results

Description Usage Arguments References See Also Examples

View source: R/query.r

Description

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

Usage

1
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

Other Drill direct REST API Interface: drill_active(), drill_cancel(), drill_connection(), drill_functions(), drill_metrics(), drill_options(), drill_opts(), drill_profiles(), drill_profile(), drill_settings_reset(), drill_set(), drill_stats(), drill_status(), drill_storage(), drill_system_reset(), drill_threads(), drill_version()

Examples

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

sergeant documentation built on Nov. 30, 2021, 1:06 a.m.