dbGetQuery,src_impala,character-method {implyr} | R Documentation |
Send SQL query to Impala and retrieve results
Description
Returns the result of an Impala SQL query as a data frame.
Usage
## S4 method for signature 'src_impala,character'
dbGetQuery(conn, statement, ...)
Arguments
conn |
object with class class |
statement |
a character string containing SQL |
... |
other arguments passed on to methods |
Value
A data.frame
with as many rows as records were fetched and as
many columns as fields in the result set, even if the result is a single
value or has one or zero rows
Note
This method is for SELECT
queries only. Use
dbExecute()
for data
definition or data manipulation statements.
Examples
## Not run:
flights_by_carrier_df <- dbGetQuery(
impala,
"SELECT carrier, COUNT(*) FROM flights GROUP BY carrier"
)
## End(Not run)
[Package implyr version 0.5.0 Index]