I went through the defination for preceding load , but could not clearly understand it, could some attacch a sample qvw explaing preceding load.
Preceding load means performing a load operation in the loaded table.
Load *, Sal*0.10 as Tax;
Load * Inline
In this you ignore one field or you can add one more field based on another field(from the loaded).
I think it´s very usefull when you want to add calculated fields in the same table you are loading, for example:
A-B*C as D,
D+A as E
This code gets you an error because D is not avaible yet, so you can use the Preceding load like this:
Load * ,
D+A as E
A-B*C as D
Now you can use field D that is created by operations with the other fieds.
Preceding load allows loading of extra derived fields on top of an already loaded table. As stated it allows the derivation of new fields based on previously derived fields without having to do a new load of the entire table.
If we load data from a file as such.
Then we want to derive a new field D, but then we also want to derive a new field based on the result of D, then you can do a preceding load as such.
IF(D = 1, 'Category 1',
IF(D = 2, 'Category 2',
IF(D = 3, 'Category 3', 'Unknown Category'))) As Category
(A + B) / C As D
It is also useful for creating key fields that contain a number of derived fields since it is extremely difficult to put a bunch of fields derived with IF statements into a single field. You can also stack more preceding loads above other preceding loads so you can derive a field from fields derived in preceding loads below it.
Note that preceding load breaks optimized load though. So if you load the actual .qvd field and put a preceding load before it, the .qvd will no longer load optimized.