Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sekharapp
Contributor III
Contributor III

what are the uses of resident and preceding load (Interview question)

what are the uses of resident and preceding load (Interview question)
1 Reply
vikasmahajan

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:

https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/load-data-...

Loading data from already loaded table is a resident load.

Hope this clear you.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.