R/truncate_redshift.R

#' Truncate redshift table
#'
#' @description{
#' Truncate redshift table
#' }
#'
#' @importFrom RJDBC dbSendUpdate
#'
#' @param connection string representing RJDBC connection name
#' @param table_name string representing the table name in redshift
#'
#' @export
#'
# Truncate table on redshift
truncate_redshift <- function(connection, table_name) {
  RJDBC::dbSendUpdate(connection, paste0("TRUNCATE TABLE ", table_name, ";"))
}
themechanicalbear/tastytrade documentation built on June 28, 2019, 10:16 p.m.