A string that goes into Mysql string column varchar(255) should ideally go to a redshift column of varchar(255) is my understanding. (utf8 charset)
I am stuck at a use case where this is failing.
I have a sample string of length 255 character,
'Test data: Around 23:43 IST on 12-10-20, a ABC event was announced due to seller contact number found missing from abc. The required field is showing empty with message on screen “Bad Response/err1 9 error in the comput”, and also unable to activate signs' => length 255
Mysql
CREATE TABLE `test_varchar255` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`token` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
insert into test_varchar255 values (1, 'Test data: Around 23:43 IST on
12-10-20, a ABC event was announced due to seller contact number found
missing from abc. The required field is showing empty with message on
screen “Bad Response/err1 9 error in the comput”, and also unable to
activate signs')
Insert Succeded
Redshift
CREATE TABLE test_varchar255 (
id BIGINT DEFAULT NULL encode mostly32,
string_01 VARCHAR(255) DEFAULT NULL ENCODE LZO
)
insert into test_varchar255 values (1, 'Test data: Around 23:43 IST on
12-10-20, a ABC event was announced due to seller contact number found
missing from abc. The required field is showing empty with message on
screen “Bad Response/err1 9 error in the comput”, and also unable to
activate signs')
ERROR: value too long for type character varying(255) Query failed PostgreSQL said: value too long for type character varying(255)
Trying to figure out the exact issue, any help?
VARCHAR(255) LZO
is really a max of 255 bytes. – Rick James