Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
1. Preceding Load
Use Preceding Load to Enhance Readability. Preceding Load allows you to perform additional load steps before initializing a table. Each step uses the output of the preceding load statement as input.
Original:
Load
Pick(Floor((Rand()*10)/2)+1,'A','B','C','D','E') - as Customer,
'Q'&(Mod(RowNo(), 4)+1) as Quarter,
Ceil((Rand() * 100) * (Rand()*10)) as Sales
AutoGenerate (100);
New:
Load
Customer,
Quarter,
TotalSales,
If(Customer = Previous(Customer),
TotalSales - Previous(TotalSales), 0) as QoQChange
;
Load
Customer ,
Quarter,
Sum(Sales) as TotalSales
Resident Original
Group By Customer,Quarter
Order by Customer,Quarter;
Drop Table Original;
Here in this example preceding load is used to calculate quarterly total for customer.
2. Resident Load:
Loading data from already loaded table is a resident load.
Hope this clear you.
Thanks
Vikas