DataGenerator requires a transformation which can be written in both CTL and Java.
See CTL Templates for DataGenerator for more information about the transformation template.
Remember that this component allows to send each record through the connected output port whose number equals the value returned by the transformation (Return Values of Transformations). Mapping must be defined for such port.