Thursday, November 21, 2013

What if excel can't remove trailing space using TRIM function


Today i wondered when excel clean and trim function could not do what it supposed to. Reason was content was copied from net and have trailing spaces. These trailing spaces are due to &nbsp which is hidden.

so I used below function within excel to get the removed trailing spaces
=TRIM(SUBSTITUTE(B1,CHAR(160),CHAR(32)))

First substitute  ASCII character for &nbsp i.e. 160 with the ASCII code for normal space i.e. 32
and in last TRIM will do it's job.

Tuesday, August 27, 2013

Salesforce Bulk API behavior with Talend



When using Talend to move records from Oracle DB to SFDC i got an error like this.

Exception in component tSalesforceOutputBulkExec_1_tSBE
[AsyncApiException  exceptionCode='InvalidBatch'
exceptionMessage='Records not processed'
]

after researching and trying lot options I found Talend taken default schema when I refreshed schema and it worked fine.

Monday, May 6, 2013

Talend tFilter Explored


Today when i was using tFilter option in Talend My filter was not fetching correct result. Check below the screenshot.







Then i decided to try Use Advance mode option and i wrote below code.
(input_row.SAP_ID.equals(null)) && (input_row.Name_1.equals(null)))

still it was not working as needed, might be because null is not meant for equals function.
I tried (input_row.SAP_ID!="" && (input_row.Name_1!="")) but no luck.

Then i searched and found Talend compare strings lexicographically so I tried to use below code and it worked perfectly.
(input_row.SAP_ID.compareTo("")!=0) && (input_row.Name_1.compareTo("")!=0)

So i got answer why above screenshot fetches wrong result which can be corrected as






Thursday, May 2, 2013