~hrbrmstr/sergeant

ref: 70a6bd9619a4234056af5898f804afa3514723dd sergeant/man/drill_query.Rd -rw-r--r-- 1.9 KiB
70a6bd96boB Rudis fixed issue with 0-length query results 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.r
\name{drill_query}
\alias{drill_query}
\title{Submit a query and return results}
\usage{
drill_query(drill_con, query, uplift = TRUE, .progress = interactive())
}
\arguments{
\item{drill_con}{drill server connection object setup by \code{drill_connection()} or
\code{drill_jdbc()})}

\item{query}{query to run}

\item{uplift}{automatically run \code{drill_uplift()} on the result? (default: \code{TRUE},
ignored if \code{drill_con} is a \code{JDBCConnection} created by
\code{drill_jdbc()})}

\item{.progress}{if \code{TRUE} (default if in an interactive session) then ask
\code{httr::POST} to display a progress bar}
}
\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 \code{dbGetQuery()} in
that the function result is a \code{tbl_df} vs a plain \code{data.frame} so you get better
default printing (which can be helpful if you accidentally execute a query and the result
set is huge).
}
\examples{
try({
drill_connection() \%>\%
  drill_query("SELECT * FROM cp.`employee.json` limit 5")
}, silent=TRUE)
}
\references{
\href{https://drill.apache.org/docs/}{Drill documentation}
}
\seealso{
Other Drill direct REST API Interface: \code{\link{drill_active}},
  \code{\link{drill_cancel}},
  \code{\link{drill_connection}},
  \code{\link{drill_functions}},
  \code{\link{drill_metrics}}, \code{\link{drill_options}},
  \code{\link{drill_opts}}, \code{\link{drill_profiles}},
  \code{\link{drill_profile}},
  \code{\link{drill_settings_reset}},
  \code{\link{drill_set}}, \code{\link{drill_show_files}},
  \code{\link{drill_show_schemas}},
  \code{\link{drill_stats}}, \code{\link{drill_status}},
  \code{\link{drill_storage}},
  \code{\link{drill_system_reset}},
  \code{\link{drill_threads}}, \code{\link{drill_use}},
  \code{\link{drill_version}}
}
\concept{Drill direct REST API Interface}