The segmentUpdate
chain is triggered by the SegmentLoader
component. This pipeline chain consists of a single processor, /atg/reporting/datawarehouse/process/SegmentLoadProcessor
.
This processor handles insert, update and delete operations from the segment log files. Unlike the SiteVisit
and SubmitOrder
pipelines, it does not perform any lookups on the production system.
Each time the SegmentLoadProcessor
component is invoked, it performs the following steps:
Gets a reference to the most recent Data Warehouse entry for the segment referred to in the log entry.
Determines what sort of change is to be applied (insert, update, or delete).
If an insert action and the item is not already in the database, the processor creates a new item. If the item already exists, the processor checks to see if a start date is specified. If not, which will typically be the case if an update or delete action is processed before an insert action, the start date of the existing item is set. If the start date has already been set, meaning there has been a prior insert action for the segment, then the current item is marked as expired and a new item is created.
If an update action, if no matching item is found, creates a new item.
If a delete action, if no matching item is found, a new item is created and marked as deleted.
Applies changes in the item to the repository.