Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Precedent Load vs Resident Load

Hi Folks, I am trying to create one intermediate QVD and first I tried with Precedent Load:

FINAL_QVD:

LOAD *,

     SubField(A,'.',1) as X,

     SubField(A,'.',2) as Y,

     ApplyMap('MAP_T',AutoNumber(LEFT(A,LEN(A)-3)),'No') as FLAG

;

LOAD DISTINCT A,B,C,D FROM [$(vQVDpath\TEST_CHECK.qvd)] (qvd);

The TEST_CHECK.qvd have 4M rows

For this code I got 4M rows in FINAL_QVD table also. But I am expecting only 1M ditinct rows only.

Again, I re-write my script with Resiednt Load below:

T:

LOAD DISTINCT A,B,C,D FROM [$(vQVDpath\TEST_CHECK.qvd)] (qvd);

FINAL_QVD:

NOCONCATNATE

LOAD *,

     SubField(A,'.',1) as X,

     SubField(A,'.',2) as Y,

     ApplyMap('MAP_T',AutoNumber(LEFT(A,LEN(A)-3)),'No') as FLAG

RESIDENT T;

DROP TABLE T;

With this, I got 1M rows in my new table FINAL_QVD.

I wonder, what is wrong with precedent load

What is the difference b/n Precedent Load & Resident Load

Thanks,

Siri

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Put the distinct clause in the top load statement, and the preceding load will remove the duplicates. A distinct clause in the following load statements will be disregarded.

HIC

View solution in original post

5 Replies
whiteline
Master II
Master II

Hi.

Distinct statement is not working this way with Precedent LOAD.

hic
Former Employee
Former Employee

Put the distinct clause in the top load statement, and the preceding load will remove the duplicates. A distinct clause in the following load statements will be disregarded.

HIC

Not applicable
Author

Thanks for Reply HIC....

I wondor, Which load give better performance?

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

use Preceding Load ,this one better performance,but resident Load slow script  and slow ur performance

Regards

Perumal A

whiteline
Master II
Master II

Hi.

I think you should make some tests, because it depends.

Just have made some tests with mapping and 6M rows. In my case "optimized QVD load+mapping from Resident" is faster than "loading from QVD and mapping with preceding load".

I guess it's because using preceding load here turns off optimized qvd load.