Understanding the Table Conversion Process Flow

When you process a table conversion, the system triggers events that are similar to the events that are triggered when a report or application is run. These events are specific to the table conversion that you defined. Events provide pauses in the processing of the table conversion where you can attach logic.

In general, the event flow is the same for all table conversion types because these conversion types are all subsets of a data conversion:

  • Data Copy.

    This conversion type does not include input and output tables; all actions are accomplished through the Process Begin event.

  • Data Copy with Table Input.

    This conversion type does not include output tables; all actions are accomplished through the Process Begin, Process End, and Row Fetched events.

  • Batch Delete.

    As with the Data Copy with Table Input type, this conversion type does not include output tables; all actions are accomplished through the Process Begin, Process End, and Row Fetched events.

The flexibility of events enables you to use table conversion types within other conversion types, if necessary.

Depending on the type of conversion that you define, some events might not be triggered. This diagram illustrates all events that can be triggered in a table conversion; events are indicated by yes or no decisions:

Table conversion event flow.

This table describes when each event occurs during the table conversion process:

Event

Description

Process Begin

Before fetching records from the input table, the system invokes the Process Begin event. At this point, you can attach logic that needs to run only once at the beginning of a table conversion, or attach any value that does not change for each record. This event is useful for mapping output fields that do not change for each record.

Data Changed

When you use data sequencing, the system invokes a Data Changed event for any sequenced field that changes. Data Changed events are not cascaded or hierarchical. For example, you can attach an event rule to this event to total a field or group of values.

Format Fetched

When you use user-defined formats (also known as flat files) in the input table, the system invokes a Format Fetched event for each record that is fetched from the input table. If you use multiple user-defined formats in a table conversion, the Format Fetched event is called for the particular format that is found in the record.

Row Fetched

An input table invokes a Row Fetched event after each row is fetched from the input table.

Process End

After the processing of all records is complete, the system invokes the Process End event. Attach event rules to the Process End event when you want the system to process logic after all input records have been read; for example, to write a total record to an output table or to write a record to a log file to record the status of the table conversion.