dbGetQuery-src_impala-character-method: Send SQL query to Impala and retrieve results

Description Usage Arguments Value Note Examples

Description

Returns the result of an Impala SQL query as a data frame.

Usage

1
2
## S4 method for signature 'src_impala,character'
dbGetQuery(conn, statement, ...)

Arguments

conn

object with class class src_impala

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

1
2
3
4
5
6
## Not run: 
flights_by_carrier_df <- dbGetQuery(
  impala,
  "SELECT carrier, COUNT(*) FROM flights GROUP BY carrier"
)
## End(Not run)

implyr documentation built on July 21, 2019, 5:04 p.m.