Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/redshift.r
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ redshift.tables <- function(conn, schema='public') {
dbGetQuery(conn, sql)
}

redshift.columns <- function(conn, schema='public', tableName) {
redshift.columns <- function(conn, tableName, schema='public') {
sql <- paste0("SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_schema = '", schema, "' AND table_name ='", tableName, "';")
dbGetQuery(conn, sql)
}
Expand Down
4 changes: 2 additions & 2 deletions man/redshift.columns.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Columns in Redshift table
Provides metadata about the columns available within a Redshift table
}
\usage{
redshift.columns(conn, schema='public', tableName)
redshift.columns(conn, tableName, schema='public')
}
\arguments{
\item{conn}{The RJDBC connection object created with \link{redshift.connect}}
\item{schema}{The schema name}
\item{tableName}{Table name as a string}
\item{schema}{The schema name}
}
\value{
Returns a dataframe listing: column name, data type, nullable.
Expand Down