Learn R Programming

implyr (version 0.5.0)

dbGetQuery,src_impala,character-method: 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 src_impala,character
dbGetQuery(conn, statement, ...)

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

Arguments

conn

object with class class src_impala

statement

a character string containing SQL

...

other arguments passed on to methods

Examples

Run this code
if (FALSE) {
flights_by_carrier_df <- dbGetQuery(
  impala,
  "SELECT carrier, COUNT(*) FROM flights GROUP BY carrier"
)}

Run the code above in your browser using DataLab