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

dbGetQuery,src_impala,character-methodR 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 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

## Not run: 
flights_by_carrier_df <- dbGetQuery(
  impala,
  "SELECT carrier, COUNT(*) FROM flights GROUP BY carrier"
)
## End(Not run)

implyr documentation built on May 29, 2024, 8 a.m.