precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« on: April 22, 2007, 12:31:32 PM » |
|
Having faced this issue a couple of times in the past few months, I'd like to explain why Prelude reports often don't balance to external data warehouses (like MITS or Cognos) without some heroics. This is not an indictment of either product, but rather to explain why this happens and how we've historically resolved it.
For a typical Prelude client, much of the information that goes into MITS comes from the ORDER.HISTORY.LINE file. This file contains details of invoiced order lines, including the product number, quantity shipped, cost, price, that sort of thing. Other data elements like product line, major group code, and several customer fields are not stored in this file but are rather stored externally (in the PRODUCT and CUSTOMER files, among others) and are referenced from those external locations. This provides a number of benefits throughout the application, but for reporting, it creates a complication.
The complication is this: Assume product A is in product line PL-A. An order is placed for this product and then is subsequently invoiced, so the details of the sale of that item are reflected in a record in ORDER.HISTORY.LINE. Then, let's say a data warehousing product comes along and takes a snapshot of that sale. Now, we have a copy of this information both in ORDER.HISTORY.LINE and also in the data warehouse (most likely both in detail form and also aggregated into the summaries).
Later, the product moves to product line PL-B. Nothing about the earlier sale has changed, but because of the external file relationships, any reports of that sale on the Prelude side will reflect that product in the new product line PL-B, not PL-A as it was at the time of the sale. The data warehouse, however, picked up that data when the product was in PL-A, so the data warehouse will include that sale in product line PL-A, but Prelude will reflect it in product line PL-B. If the product line for that product is changed again, every sale of that product (from inception to current date) will automagically reflect the new product line, not the product line at the time of the sale. This is also true for several customer, contact, ship to, and ship via fields that are externally referenced from ORDER.HISTORY.LINE.
To resolve this, we've identified the translated attributes that are needed for balancing to a data warehouse, and have a trigger that updates these attributes in a record stored parallel to the ORDER.HISTORY.LINE record. Then, by using this external information in place of the translated information both for Prelude reporting and for data warehouse extraction, we have a stable system of record from which to balance both the Prelude and external reports.
We've always been concerned regarding trigger performance, but by using very clean and optimized code we've done this several times without the client ever noticing any change in performance. Also, considering that this new record is easily indexed, we've been able to actually reduce overall system overhead with this technique.
|