We are migrating the data from DB2 LUW to Aurora PostgreSQL database using AWS DMS.
For few tables we have a column with data type varchar(22) and the value of the column could end up having ending spaces (Trailing Spaces).
DMS is migrating the data as it is from DB2 to PostgreSQL and validation also successful.
Looks like DB2 is not bother about the trailing spaces and giving us the data, but PostgreSQL is bit strict on this and not giving the data.
Example:
DB2:
By using this command, we can see whether there is spaces are there not.
select hex(name) as name from employee where name = ‘lakshmi’;
PostgreSQL:
select * from employee where name=’lakshmi’; — no data
select * from employee where name is like ‘lakshmi%’; — got the data
select * from employee where rtrim(name)=’lakshmi’; — got the data
Is there any way to setup something in AWS DMS tool and it will automatically resolve the issue or any other way to resolve these type of issues