You are not logged in.

#1 2017-03-15 17:43:32

nf
Member
4 posts

nf said:

trim on columns in tParseRecordSet component

Hello,
I've noticed that in the java generated code for the tParseRecordSet component, there is an automatic trim on the column values of the  attribute table ! See example code below :
                    res_str_tParseRecordSet_1 = re_tParseRecordSet_1
                            .getString("PRO_EMAIL");
                    if (res_str_tParseRecordSet_1 != null) {
                        row3.PRO_EMAIL = res_str_tParseRecordSet_1.trim();
                    } else {
                        // row3.PRO_EMAIL = res_str_tParseRecordSet_1;
                        row3.PRO_EMAIL = null;
                    }
Because of this, I get some records updated instead of inserted  when connecting tParseRecordSet to a tMSSqlOutput component !
Why is it so ? Is it possible to avoid such operation in the component ?
Thanks in advance for your replies.
NF

Offline

#2 2017-03-16 08:50:32

xdshi
Talend Team


xdshi said:

Re: trim on columns in tParseRecordSet component

Hi NF,
What does your current job design look like? Screenshots of your job setting will be helpful for us to address your issue.
Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#3 2017-03-16 10:43:27

nf
Member
4 posts

nf said:

Re: trim on columns in tParseRecordSet component

Hello,
Below is a screenshot of my job.
The tMSSqlSP_1 returns records with one of the fields being an email that is used as a key further on in the job. Records can have same email  differing only by leading or trailing spaces. I need to keep those records anyway with their "slightly different emails". But when passing through the tParseRecordSet_1, the records have exactly the same email because of the implicit trim in that component which I do not want! That's my problem. Do you have any solution?


Thanks in advance for your replies.

NF

Offline

#4 2017-03-16 11:05:22

nf
Member
4 posts

nf said:

Re: trim on columns in tParseRecordSet component

Sorry, here's my screenshot :

 

Offline

#5 2017-03-16 15:17:41

nf
Member
4 posts

nf said:

Re: trim on columns in tParseRecordSet component

 
Hello,
Sorry but I don't succeed in pasting the screenshot ! So I send you a diagram of my job :
tMSSqlSP ---> tParseRecordSet ---> tMap ---> tMSSqlOutput
Best Regards,
NF

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy