Pages

Monday, March 18, 2013

How do we create Custom Error Log in Informatica and Which function is used?


ERROR:
The ERROR function causes the Informatica Server to skip a record and throws an error message defined by the user. It is available in the Designer.
ERROR( string )
Example : The following example shows how you can reference a mapping that calculates the average salary for employees in all departments of your company, but skips negative values. The following expression nests the ERROR function in an IIF expression so that if the Informatica Server finds a negative salary in the Salary port, it skips the row and displays an error:
IIF( SALARY < 0, ERROR (‘Error. Negative salary found. Row skipped.’, EMP_SALARY )
SALARY RETURN VALUEclip_image004[11]
10000 10000
-15000 ‘Error. Negative salary found. Row skipped.’
The below example combines two special functions, a test Function and a conversion function.
IIF(IS_DATE(DATE_PROMISED,’MM/DD/YY’),TO_DATE(DATE_PROMISED),
ERROR(‘Invalid Date’))

No comments:

Post a Comment