Note on case transform – This transform allows you to specify multiple conditions and route the data to multiple targets depending upon the condition.
If you observe the case transform icon, it says it will accept one source and will produce multiple targets. Only one of multiple branches is executed per row.
Will see what all the options available,
Label: This is nothing but the Name of Condition, if case condition is true the data will route to that particular target.
Expression: This defines cases and labels for output paths
Default: Only available if “Produce default option when all expression are false” option is enabled.
True: For one case only option is enabled, the row is passed to 1st case whose expression returns true else passed to all cases whose expression returns true.
Data O/P: Connection between case transform & obj used for a particular case must be labeled. Each O/P label must be used at least once
- Design a DF that extract records from EMP table
- Now place a case transform on to the workspace from local object library
- Connect source to case transform, give a dbl. click on case transform, Case editor window will be opened
- Now you can add the case conditions according to your requirement.
- After defining the case condtions, comeout from the editor and link the appropriate targets.
Validate the DF, save the job and execute it.
- Now check the data in each target.