redshiftTools icon indicating copy to clipboard operation
redshiftTools copied to clipboard

UTF-8 character insert errors

Open tcederquist opened this issue 5 years ago • 0 comments

Double byte char types like utf-8 such as JP characters are actually a different size in redshift storage for varchar, needs to accommodate these double type types. Can you update the nchar function in tabledefinitions.R line 4 to read:

maxChar = max(nchar(col, type='bytes'), na.rm=T)

Sample code to create the issue:

dat1 <- data.frame(A="あいう",stringsAsFactors = F) b=rs_create_table(dat1, dbcon=con, table_name='mytesttable', split_files=1)

Above results in ERROR: Load into table 'uvroyetkqxjdgcbn' failed. Check 'stl_load_errors' system table for details.

In stl_load_errors is says String length exceeds DDL length

tcederquist avatar Dec 17 '19 13:12 tcederquist