I am trying to save a data frame to an AWS redshift database using a postgres connection established using dplyr's src_postgres
function. As you can see below there is a column in the data frame that is over 256 characters (some are even more). When I try to save this data frame to redshift I get the following error when I use dplyr's copy_to
function. Is there anyway I can increase the limit of the number of characters so I can save this data frame onto AWS redshift, or does anyone else have any suggestions on how to save my data frame to redshift? Thank you.
> nchar(df$text)
[1] 598
> copy_to(conn_dplyr, df, TableName, temporary = FALSE)
Error in postgresqlExecStatement(conn, statement, ...) :
RS-DBI driver: (could not Retrieve the result : ERROR: value too long for type character varying(256)
)