Tuesday, June 1, 2010

Informatica: Lookup not returning data

Symptom: A lookup in informatica is not returning a row or rows of data, even if it is being supplied with the correct lookup condition values.

Possible Solution: If the field used in the lookup condition is type text in the database and that same field is being treated as type number in the informatica mapping, then this might cause the lookup not to work properly. In informatica, most probably, the field value will be having a decimal followed by zeroes since it is being treated as a number.  This will not be the case in the database, since it is of type Text. So in the lookup we will be doing a comparison such as "20.0000000 = 20", for example and it will not find the record.  To prevent such a situation, in the informatica mapping, an expression such as TO_CHAR(ROUND(FIELD_NAME,0)) can be used to convert the field value to type Text just prior to sending it as input to the lookup.  This solution will work, if the value stored in database is a whole number.

No comments:

Post a Comment