Use the Expression transformation to calculate values in a single row
before we write to the target. For example, we might need to adjust
employee salaries, concatenate first and last names, or convert strings
to numbers.
Use the Expression transformation to perform any non-aggregate calculations.
Example: Addition, Subtraction, Multiplication, Division, Concat, Uppercase conversion, lowercase conversion etc.
We can also use the Expression transformation to test conditional statements before we output the results to target tables or other transformations. Example: IF, Then, Decode
There are 3 types of ports in Expression Transformation:
To use the Expression transformation to calculate values for a single row, we must include the following ports:
Performance tuning :
Expression transformation is used to perform simple calculations and also to do Source lookups.
Use the Expression transformation to perform any non-aggregate calculations.
Example: Addition, Subtraction, Multiplication, Division, Concat, Uppercase conversion, lowercase conversion etc.
We can also use the Expression transformation to test conditional statements before we output the results to target tables or other transformations. Example: IF, Then, Decode
There are 3 types of ports in Expression Transformation:
- Input
- Output
- Variable: Used to store any temporary calculation.
To use the Expression transformation to calculate values for a single row, we must include the following ports:
- Input or input/output ports for each value used in the calculation: For example: To calculate Total Salary, we need salary and commission.
- Output port for the expression: We enter one expression for each output port. The return value for the output port needs to match the return value of the expression.
Performance tuning :
Expression transformation is used to perform simple calculations and also to do Source lookups.
- Use operators instead of functions.
- Minimize the usage of string functions.
- If we use a complex expression multiple times in the expression transformer, then Make that expression as a variable. Then we need to use only this variable for all computations.
No comments:
Post a Comment