The Transformer stage is a processing stage used to transform individual input rows into output rows. It allows you to write complex expressions, apply functions, use variables, and route data to different links based on conditions.
A Complete Learning Hub for ETL development, DataStage job design, data pipelines, SQL optimization, and Data Engineering fundamentals. Clear explanations, practical scenarios, and real-world solutions to help you upskill and grow in the data world.
The Transformer stage is a processing stage used to transform individual input rows into output rows. It allows you to write complex expressions, apply functions, use variables, and route data to different links based on conditions.
Evaluates each row individually.
You can derive new columns using:
String functions (Trim, Substring, etc.)
Date/time functions
Lookup functions
Conditional expressions (If…Then…Else)
Used to filter and control the flow of data to each output link.
Example:
If Amount > 1000 Then 1 Else 0
Used for complex logic.
Can store intermediate calculations.
Can maintain values across rows.
Example: Running total or previous row value.
You can split data into multiple outputs based on constraints.
Example:
Valid Records
Rejected Records
Error Records
You can reference a reference link directly inside derivations.
Use it when you need:
Data validation
Complex business logic
Conditional filtering
Field derivations
Reference lookups (small/moderate datasets)
Very large dataset joins (use Join/Merge stage instead)
Column-level mass transformations (use Modify stage)
High-performance parallel logic (Transformer is slower)
Source: Customer records
Logic:
If Age > 18 → mark “Adult”
If Country = ‘IN’ → output to India link
Else → output to Others link
All of this is done inside the Transformer stage.
No comments:
Post a Comment