In record extraction, evaluation of extraction target conditions and extraction conditions and joining of extracted records occur before a new record (retrieved record) is generated. The following figure shows the flow of data processing during record extraction.
Figure 10-14 Flow of data processing during record extraction
Details of the processing in 1 through 3 in this figure are provided below. For details about the tags and attributes in the record extraction definition in the adaptor configuration definition file that are discussed below, see 9.11.4 Record extraction definition.
This processing involves evaluating the extraction target conditions in the input records.
An extraction target condition is one of the types of conditions used to select records to be extracted. You specify an extraction target condition in the targetrecord tag in the record extraction definition.
For the extraction target conditions, specify a record condition and a field condition.
For example, to specify the record name R1, field name F1, and field value MIKE as the conditions, specify source="R1" for the record name in the record condition and source="F1" condition="eq" value="MIKE" in the field condition.
Evaluating the extraction target conditions involves evaluating the record condition and field condition according to the extraction target conditions specified in the record extraction definition.
The extraction condition is evaluated for the records that satisfy the extraction target condition.
An extraction condition is one of the types of conditions used to select records to be extracted. You specify an extraction condition in the extraction tag in the record extraction definition.
For the extraction condition, you specify the maximum number of records that can be retained in the record buffer and a condition between records. For the condition between records, you specify the record input order and the field values to be compared between records. The targets tag is used to specify the condition between records.
Evaluating the extraction conditions involves evaluating the condition between records according to the extraction conditions specified in the record extraction definition. The records that satisfy the condition between records are retained in the record buffer until the extraction conditions are satisfied. The flow of evaluating the extraction conditions is described below.
The following figure shows an example of the flow of retaining and discarding records when the record input order is specified.
Figure 10-15 Example flow of retaining and discarding records when the record input order is specified
This example specifies the record input order as Record A Record B
Record C. As a result, the input records are retained or discarded as follows:
If records are discarded, the number of discarded records is output to the adaptor trace information. For details about the adaptor trace information, see 6.3.3 Details of adaptor trace information.
During the extraction condition evaluation processing, records are also discarded if their time information is out of sequence or a timeout occurs on a record retained in the record buffer. These situations are discussed below.
Figure 10-16 Flow of record processing in the event of a timeout
Figure 10-17 Processing when the same record is input
Generation of a retrieved record involves joining the records that satisfy the extraction conditions to generate a retrieved record. The flow of retrieved record generation is described below.
A field containing the extraction condition name specified in the name attribute in the extraction tag is added to the generated retrieved record.
The following figure shows an example of a retrieved record.
Figure 10-18 Example of a retrieved record
This example joins records A and C to generate a new record E as the retrieved record.