redshiftTools
redshiftTools copied to clipboard
UTF-8 character insert errors
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