dbGetQuery,src_impala,character-method | R Documentation |
Returns the result of an Impala SQL query as a data frame.
## S4 method for signature 'src_impala,character'
dbGetQuery(conn, statement, ...)
conn |
object with class class |
statement |
a character string containing SQL |
... |
other arguments passed on to methods |
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
This method is for SELECT
queries only. Use
dbExecute()
for data
definition or data manipulation statements.
## Not run:
flights_by_carrier_df <- dbGetQuery(
impala,
"SELECT carrier, COUNT(*) FROM flights GROUP BY carrier"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.