Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

ERROR

ERROR

Causes
Data Integration
to skip a row and issue an error message, which you define.
Data Integration
writes the skipped row and the error message into the error rows file.
Use ERROR in expressions to validate data. Generally, you use ERROR within an IIF or DECODE function to set rules for skipping rows. You might use ERROR to keep null values from passing into a target.
You can also include ERROR in expression to handle transformation errors.

Syntax

ERROR(
string
)
Argument
Required/
Optional
Description
string
Required
String value. The message you want to display when
Data Integration
skips a row based on the expression containing the ERROR function. The string can be any length.

Return Value

String.

Example

The following example shows how to reference a mapping that calculates the average salary for employees in all departments of the organization, but skip negative values. The following expression nests the ERROR function in an IIF expression so that if
Data Integration
finds a negative salary in the Salary column, it skips the row and displays an error:
IIF( SALARY < 0, ERROR ('Error. Negative salary found. Row skipped.', EMP_SALARY )
SALARY
RETURN VALUE
10000
10000
-15000
'Error. Negative salary found. Row skipped.'
NULL
NULL
150000
150000
1005
1005

0 COMMENTS

We’d like to hear from you!