Table of Contents

Search

  1. Preface
  2. Components
  3. API collections
  4. Business services
  5. File listeners
  6. Fixed-width file formats
  7. Hierarchical schemas
  8. Intelligent structure models
  9. Refining intelligent structure models
  10. Mapplets
  11. Saved queries
  12. Shared sequences
  13. User-defined functions

Components

Components

User-defined functions

User-defined functions

User-defined functions are reusable functions that you can use in expressions. Create user-defined functions to build complex expressions using the
Informatica Intelligent Cloud Services
transformation language. User-defined functions use the same syntax and can use the same transformation language components as transformation and field expressions.
You can include a user-defined function in a transformation expression in a mapping or mapplet, in a field expression in a
mapping
task, or in another user-defined function. To use a user-defined function in an expression, you select the user-defined function in the expression editor and enter the required arguments.
You cannot use a user-defined function in an expression in a
synchronization
task. You also cannot use a user-defined function in any transformation in an
elastic mapping
.
To create and use user-defined functions, your organization must have the appropriate license.

Example

You want to remove leading and trailing spaces from a text string such as a name or address. You create a user-defined function called RemoveSpaces that takes a text string as an argument and performs the LTRIM and RTRIM functions. When you configure the user-defined function, you enter the following expression:
LTrim( RTrim(TextString) )
After you create the function, you use it in an Expression transformation to remove leading and trailing spaces from the incoming field, LAST_NAME. The expression field contains the following expression:
:UDF.RemoveSpaces(LAST_NAME)
In the expression, the user-defined function name is prefaced with :UDF. The incoming field LAST_NAME is passed to the function as the argument.

0 COMMENTS

We’d like to hear from you!