Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Aggregator Transformation
  4. Custom Transformation
  5. Custom Transformation Functions
  6. Data Masking Transformation
  7. Data Masking Examples
  8. Expression Transformation
  9. External Procedure Transformation
  10. Filter Transformation
  11. HTTP Transformation
  12. Identity Resolution Transformation
  13. Java Transformation
  14. Java Transformation API Reference
  15. Java Expressions
  16. Java Transformation Example
  17. Joiner Transformation
  18. Lookup Transformation
  19. Lookup Caches
  20. Dynamic Lookup Cache
  21. Normalizer Transformation
  22. Rank Transformation
  23. Router Transformation
  24. Sequence Generator Transformation
  25. Sorter Transformation
  26. Source Qualifier Transformation
  27. SQL Transformation
  28. Using the SQL Transformation in a Mapping
  29. Stored Procedure Transformation
  30. Transaction Control Transformation
  31. Union Transformation
  32. Unstructured Data Transformation
  33. Update Strategy Transformation
  34. XML Transformations

Transformation Guide

Transformation Guide

Working with Expressions

Working with Expressions

You can enter expressions using the Expression Editor in some transformations. Create expressions with the following functions:
  • Transformation language functions.
    SQL-like functions designed to handle common expressions.
  • User-defined functions.
    Functions you create in PowerCenter based on transformation language functions.
  • Custom functions.
    Functions you create with the Custom Function API.
Enter an expression in a port that uses the value of data from an input or input/output port. For example, you have a transformation with an input port IN_SALARY that contains the salaries of all the employees. You might use the values from the IN_SALARY column later in the mapping, and the total and average salaries you calculate through this transformation. For this reason, the Designer requires you to create a separate output port for each calculated value.
The following table lists the transformations in which you can enter expressions:
Transformation
Expression
Return Value
Aggregator
Performs an aggregate calculation based on all data passed through the transformation. Alternatively, you can specify a filter for records in the aggregate calculation to exclude certain kinds of records. For example, you can find the total number and average salary of all employees in a branch office using this transformation.
Result of an aggregate calculation for a port.
Data Masking
Performs a calculation based on the value of input or output ports for a row. An expression is a method to mask production data in the Data Masking transformation.
Result of a row-level calculation using input or output ports.
Expression
Performs a calculation based on values within a single row. For example, based on the price and quantity of a particular item, you can calculate the total purchase price for that line item in an order.
Result of a row-level calculation for a port.
Filter
Specifies a condition used to filter rows passed through this transformation. For example, if you want to write customer data to the BAD_DEBT table for customers with outstanding balances, you could use the Filter transformation to filter customer data.
TRUE or FALSE, depending on whether a row meets the specified condition. Only rows that return TRUE are passed through this transformation. The transformation applies this value to each row passed through it.
Rank
Sets the conditions for rows included in a rank. For example, you can rank the top 10 salespeople who are employed with the company.
Result of a condition or calculation for a port.
Router
Routes data into multiple transformations based on a group expression. For example, use this transformation to compare the salaries of employees at three different pay levels. You can do this by creating three groups in the Router transformation. For example, create one group expression for each salary range.
TRUE or FALSE, depending on whether a row meets the specified group expression. Only rows that return TRUE pass through each user-defined group in this transformation. Rows that return FALSE pass through the default group.
Update Strategy
Flags a row for update, insert, delete, or reject. You use this transformation when you want to control updates to a target, based on some condition you apply. For example, you might use the Update Strategy transformation to flag all customer rows for update when the mailing address has changed, or flag all employee rows for reject for people who no longer work for the company.
Numeric code for update, insert, delete, or reject. The transformation applies this value to each row passed through it.
Transaction Control
Specifies a condition used to determine the action the Integration Service performs, either commit, roll back, or no transaction change. You use this transformation when you want to control commit and rollback transactions based on a row or set of rows that pass through the transformation. For example, use this transformation to commit a set of rows based on an order entry date.
One of the following built-in variables, depending on whether or not a row meets the specified condition:
  • TC_CONTINUE_TRANSACTION
  • TC_COMMIT_BEFORE
  • TC_COMMIT_AFTER
  • TC_ROLLBACK_BEFORE
  • TC_ROLLBACK_AFTER
The Integration Service performs actions based on the return value.

0 COMMENTS

We’d like to hear from you!