Thursday, February 13, 2014

Using Date format to fetch data from SQL in talend

this is how context variable can be used

"SELECT * FROM ACCOUNTS WHERE
TO_DATE(CREATEDATE, 'YYYY-MM-DD\"T\"HH24:MI:SS') <= " + context.LastRunTime + " AND
TO_DATE(LASTMODIFIEDDATE, 'YYYY-MM-DD\"T\"HH24:MI:SS') > " + context.LastRunTime

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

Thursday, December 27, 2012

BT Feature by Salesforce

Salesforce has a number of features that they can enable or enhance via their “Black Tab” on an org by org basis.

Wednesday, October 24, 2012

SSN Validation rule
Recently we come up with requirement where we need to validate Social security number. Here it is for you all. Before that i want to elaborate on structure of SSN number. it is nine-digit number in the format "AAA-GG-SSSS".The number is divided into three parts first part denotes the Area and middle 2 digit is Geo and last four digits are Serial Numbers that represents a numerical sequence of digits from 0001-9999.

Not(OR(LEN(SSN__c)=0,REGEX(SSN__c,"[0-9]{3}-[0-9]{2}-[0-9]{4}"))).