This section comprises the main body of the processing portion of the Apply Engine script. It essentially initiates a processing loop beginning with the first record of the source datastore until the last record from the source datastore has been processed. There are only four commands used in the main Processing Section:
- PROCESS – Identifies the target datastore(s) that will be acted upon by the script. This command is used in conjunction with the FOR parameter specified in the DATASTORE command for the target datastore which explicitly states whether data in the target will be CHANGED, DELETED, INSERTED, MODIFIED, REPLACED OR UPDATED. See the detailed description for the DATASTORE command for a detailed description of the processing options and how they may be used.
- SELECT / FROM – Command pair that must always be used together. Causes records to be read from the input source datastore specified as a parameter on the FROM command and forms the beginning of the main processing loop(s) that continues until all records in the source datastore have been read or the Apply Engine is otherwise terminated. Source to target data mapping and Functions can be specified between the SELECT / FROM command pair.
- UNION – allows for the ‘chaining’ of multiple SELECT / FROM command pairs. Enables processing of additional source datastores and or provides the means to perform additional processing once all records in the source datastore have been processed.