Learn R Programming

redshift (version 0.5)

redshift.columns: Columns in Redshift table

Description

Provides metadata about the columns available within a Redshift table

Usage

redshift.columns(conn, schema='public', tableName)

Arguments

conn
The RJDBC connection object created with redshift.connect
schema
The schema name
tableName
Table name as a string

Value

Returns a dataframe listing: column name, data type, nullable.

Examples

Run this code
require(redshift)
# conn <- redshift.connect("jdbc:postgresql://blah.blah.eu-west-1.redshift.amazonaws.com:5439/data", "username", "password")
# cols <- redshift.columns(conn, "weblog")
# cols2 <- redshift.columns(conn, "dev", weblog")

Run the code above in your browser using DataLab