Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data is populated with Whitespace through Talend

 Hi Team,

 

We are seeing issue in table value which are populated from DB2 (source)  to Postgres (Target).

I have including here all the job details for each component.

 

0683p000009M8kT.jpgJob Sesign0683p000009M8kY.jpgSource DB2 Schema0683p000009M8kd.jpgTarget Postgres schema0683p000009M8ki.jpgtmap

Based on the above approach and once the data has been populated, when we run the below query in the Postgres DB.

 

SELECT * FROM VMRCTTA1.VMRRCUST_SUMM where cust_gssn_cd='XY03666699' ;

SELECT * FROM VMRCTTA1.VMRRCUST_SUMM where cust_cntry_cd='847' ;

 

There will be no records were returned however, when we run the same query with Trim as below it works.

 

SELECT * FROM VMRCTTA1.VMRRCUST_SUMM where trim(cust_gssn_cd)='XY03666699' ;

SELECT * FROM VMRCTTA1.VMRRCUST_SUMM where trim(cust_cntry_cd)='847' ;

 

Below are the ways we have tried to overcome this but no luck.

 

1. Used tmap between source and target component.

2. Used trim in source component under Advanced setting.

3. Change the datatype in Postgres DB of cust_cntry_cd from char(5) to Character varying, this will allow value without any length restriction.

 

Please suggest what is missing as we have this issue in almost all the table where we have character/varchar columns.

 

We are using TOS.

 

Regards,

Rohit. 

 

Labels (2)
3 Replies
manodwhb
Champion II
Champion II

@rohitatcs , As per my understanding you need to change the data type in psotgrssql side. check the below link to do that .

 

https://stackoverflow.com/questions/13160388/my-postgresql-auto-inserts-many-space-characters-after-...

 

http://www.postgresqltutorial.com/postgresql-char-varchar-text/

Anonymous
Not applicable
Author

@manodwhbThanks for your response.

I have found that I can able to resolve my issue for column where source have Char(5) and target I setup Text with trim selected in Source side but I see still we have issue with Varchar(30) column in source where we have tried both with setting target column as Varchar(30) or Text but no luck.

Please suggest. I am attaching here my schema configuration in Talend.

 

0683p000009M8KV.jpgHighlighted column one have text another with varchar(30) , both have whitespace issue0683p000009M881.jpgJob-Design 

Anonymous
Not applicable
Author

Can someone please update on this or it's bug on TOS.

Please community member help us to resolve this issue.