How to write back wrangling result to Database (like Amazon Redshift)

How to write back wrangling result to DB (like Amazon Redshift)

Write Custom R Script for write back function

writebackToRedshift <- function(df){
  # get connection
  requireNamespace("DBI")
  requireNamespace("RPostgreSQL")
  drv <- DBI::dbDriver("PostgreSQL")
  conn <- RPostgreSQL::dbConnect(drv, dbname="test", user = "myuser",
                                     password = "mypassword", host = "myhost", port = 5432)
  DBI::dbWriteTable(conn, "writeback_test", df)
  DBI::dbDisconnect(conn)
  # Make sure to return df at the end.
  df
}

Call custom R Script from a Command

If you want to stop write back.

Select menu on the write back step and select Disable Step menu.