Learn R Programming

RAthena (version 2.6.1)

dbColumnInfo: Information about result types

Description

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

Usage

# S4 method for AthenaResult
dbColumnInfo(res, ...)

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).

Arguments

res

An object inheriting from DBIResult.

...

Other arguments passed on to methods.

See Also

Examples

Run this code
if (FALSE) {
# 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(RAthena::athena())

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

# Disconnect from Athena
dbDisconnect(con)
}

Run the code above in your browser using DataLab