Staging
>
Building and Compiling the Procedure
Building and Compiling the Procedure
Once the above questions are completed the procedure is built and compiled automatically. If the compile fails an error will be displayed along with the first few lines of error messages. Compilation failures typically occur when the physical creation of the table was not done. If the compile fails for some other reason the best approach is to use the procedure editor to edit and compile the procedure. The procedure editor will highlight all the errors within the context of the procedure.
Once the procedure has been successfully compiled it can either be executed interactively or passed to the scheduler.
Tuning the Staging Update Process
This section is for Cursor based procedures only. It is not relevant for Set based or other types.
When generating the cursor based procedures to update the staging table QAD Data Warehouse Designer includes Update/Insert logic. This logic first attempts to update an existing staging record and then inserts a new record if the record does not exist. This build option should be altered once an understanding of the data you are dealing with is acquired. For the initial prototype and testing phases of a data warehouse analysis area we need to find out if our business keys for the fact table are genuinely unique. The update/insert logic in the staging procedure will only perform an 'Update' if our business key is not unique. In such a situation we need to decide if this is a failure in the business key, or some form of additive record situation we need to handle and code accordingly.