Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions
  8. Creating Custom Functions
  9. Custom Function API Reference

Transformation Language Reference

Transformation Language Reference

Custom Function Validation Function

Custom Function Validation Function

PowerCenter calls validateFunction to validate the arguments in the custom function. It uses this function to provide the name, datatype, precision, and scale of the arguments in the custom function. It also uses this function to provide the datatype of the return value of the custom function.
PowerCenter calls this function once for each instance of the custom function used in a mapping or workflow.
Use the following syntax:
INFA_EXPR_STATUS *(validateFunction)(IUNICHAR* sNamespace, IUNICHAR* sFuncName, IUINT32 numArgs, INFA_EXPR_OPD_METADATA** inputArgList, INFA_EXPR_OPD_METADATA* retValue);
Argument
Datatype
Input/
Output
Description
sNamespace
IUNICHAR
Input
Namespace of the function.
sFuncName
IUNICHAR
Input
Name of the custom function to validate.
numArgs
IUINT32
Input
Number of arguments in the custom function.
inputArgList
INFA_EXPR_OPD_METADATA
Input
Input arguments of the custom function.
retValue
INFA_EXPR_OPD_METADATA
Output
Metadata of the return port of the custom function. Set the datatype, precision, and scale of the return value in this argument.
The return datatype is
INFA_EXPR_STATUS
. Use ISUCCESS and IFAILURE as the return value. When the function returns IFAILURE, PowerCenter displays an error message.

0 COMMENTS

We’d like to hear from you!