dbColumnInfo: Information about result types

Description Usage Arguments Value See Also Examples

Description

Produces a data.frame that describes the output of a query.

Usage

1
2
## S4 method for signature 'AthenaResult'
dbColumnInfo(res, ...)

Arguments

res

An object inheriting from DBIResult.

...

Other arguments passed on to methods.

Value

dbColumnInfo() returns a data.frame with as many rows as there are output fields in the result. The data.frame has two columns (field_name, type).

See Also

dbHasCompleted

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Note: 
# - Require AWS Account to run below example.
# - Different connection methods can be used please see `RAthena::dbConnect` documnentation

library(DBI)

# Demo connection to Athena using profile name 
con <- dbConnect(noctua::athena())

# Get Column information from query
res <- dbSendQuery(con, "select * from information_schema.tables")
dbColumnInfo(res)
dbClearResult(res)
 
# Disconnect from Athena
dbDisconnect(con)

DyfanJones/noctua documentation built on Jan. 23, 2020, 3:37 a.m.