T) Explain the Run time Behaviour of Reformat Component ?
The Reformat component processes your data records through these steps:
Basic Setup:
Each output port is numbered (out0, out1, out2, etc.)
Each output has matching reject and error ports (reject0/error0, reject1/error1, etc.)
Step-by-Step Process:
Read a Record
Takes one record from the input port
Check Selection Filter (if you have one)
If the filter expression returns FALSE: Record is skipped, go to next record
If the filter returns NULL: Graph stops with an error message
If the filter returns TRUE (or no filter exists): Continue processing
Determine Where to Send the Record
If you have only one output port: Record goes to that port automatically
If you have multiple output ports:
Uses
output-indexto decide which port(s) get this recordCan send to one port or multiple ports
If there's an error choosing ports, record goes to reject0
Transform the Record
For each designated output port:
If no transform is defined: Uses automatic field mapping
If transform is defined: Runs your custom logic
Ports are processed in order (out0 first, then out1, etc.)
Handle Results
If transform succeeds: Record goes to the output port
If transform fails or returns NULL:
Error message goes to error port
Original record goes to reject port
If too many rejects occur: Graph stops running
Repeat
Moves to the next input record and starts over
Key Points:
Records can be sent to multiple output ports
Each transform runs independently
Unconnected reject/error ports automatically discard records
The order of port processing matters for functions like
next_in_sequence
This process continues until all input records are processed or the graph stops due to errors/reject limits.
Comments
Post a Comment