I am able to connect to AWS redshift cluster using RPostgreSQL package; read tables, even create tables using SQL - dbGetQuery. However, if I try to write a data.frame as below (wher con is a dbConnect object into redshift, and newdf if a simple data.frame
dbWriteTable(con,"newtb",newdf)
I get following error:
Error in postgresqlgetResult(new.con) : RS-DBI driver: (could not Retrieve the result : ERROR: LOAD source is not supported. (Hint: only S3 or DynamoDB based load is allowed)
I have tried multiple simple data.frames, while reading data.frame works writing does not. Hint tells me to use s3 for loading, which means I can process data in R but cannot write a data.frame back to redshift, unless i use explicit inserts. Any ideas what I am doing wrong? or if this is an inherent way redshift prohibits or forces you to use s3
COPY INTO STDINwhere redshift does not (it only supports loading from S3 or dynamodb) - hadley