Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sangeeth8787
Contributor III
Contributor III

How to load optimized qvd with two where condition or more conditions

I have situation, one of the previous developer

created load script as  Load * from  x.qvd(qvd) where color = 'red' and year = 2018.  

 

Because of two where conditions, the load is not optimized, how can we create the above load script with 2 conditions as optimized load. I have been searching in community but I haven't got much luck, could you please provide some hint on this scenario. Many Thanks in Advance

1 Solution

Accepted Solutions
sunny_talwar

Create a new field in your qvd which combines color and year into a new field

Table:
LOAD ...,
   color,
   year,
   color&'|'&year as key
FROM ...;

STORE Table into x.qvd (qvd);

now when you load this... create an inline load of what you wish to load....

Temp:
LOAD * INLINE [
Key
red|2018
];

and then load the qvd like this

LOAD *
FROM x.qvd (qvd)
Where Exists(key);

DROP Table Temp;

View solution in original post

1 Reply
sunny_talwar

Create a new field in your qvd which combines color and year into a new field

Table:
LOAD ...,
   color,
   year,
   color&'|'&year as key
FROM ...;

STORE Table into x.qvd (qvd);

now when you load this... create an inline load of what you wish to load....

Temp:
LOAD * INLINE [
Key
red|2018
];

and then load the qvd like this

LOAD *
FROM x.qvd (qvd)
Where Exists(key);

DROP Table Temp;