Purpose of Redefine Format:
- REDEFINE FORMAT copies records from its in port to its out port without changing the values in the records.
- It can also be used to improve the graph performance by reducing number of fields in the input records - by renaming the fields
There are no parameters in Components
Runtime behavior of REDEFINE FORMAT
- Reads the records arriving at the in port.
- Writes the records to the out port with the fields renamed according to the record format of the out port.
REDEFINE FORMAT is designed not to support implicit reformat, so that you can use it to change the record format associated with a particular flow.
To do this, you have to assign a record format to the out port different from the record format on the in port.
If you use REDEFINE FORMAT to change a record format, then you have to make sure you specify an output record format compatible with the input record format. For example, if you combine several fields into one, that one field must have the same number of bytes as the total of the original several fields .See the below example for more details:
Suppose the input record format is:
record
string(10) first_name;
string(10) last_name;
string(30) address;
decimal(5) zipcode;
decimal(8.2) income;
end;
You can reduce the number of fields by specifying an output record format of:
record
string(55) person_info;
decimal(8.2) income;
end;