Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load data without where condition in optimize way

hello

i have 1 table which is contain South, North, West, East data,i want to show data for only North region but i dont want to used where condition in it then how it is possible by using optimize way.

Thanks..

26 Replies
RSvebeck
Specialist
Specialist

We need more information to answer your question.

Svebeck Consulting AB
Anonymous
Not applicable
Author

i have 1 table

region:

LOAD South,

     North,

     West,

     east

FROM News;

i want to show data only from North region in optimize way without using where condition.

RSvebeck
Specialist
Specialist

ok. but optimezed for what purpose? script execution time? Server memory? Client performance?

Svebeck Consulting AB
Anonymous
Not applicable
Author

ok leave it that optimize, just tell me only without where

RSvebeck
Specialist
Specialist

Its dificult to understand your question, and why using "Where" is not an option.


but from you example code - if dimensions west, east and south are to be ignored, just do a distinct load and remove dimensions not wanted.


load Distinct

   north

from news;



Svebeck Consulting AB
Anonymous
Not applicable
Author

actually i faced this scenario in interview

RSvebeck
Specialist
Specialist

ah, ok.


perhaps they mean you want to keep qvd-optimized load but the  Where clause causes the load be not qvd-optimimized... its a normal interview question...


if this is what they mean, the best practice is to do this, it will be very fast load:


temp_opt:

load region, field1, field2,field3 from news.qvd;


news:

noconcatenate

load field1,field2, field3 resident temp_opt where region='North';


drop table temp_opt;



Svebeck Consulting AB
Anonymous
Not applicable
Author

but he said without using any condition in where clause.

RSvebeck
Specialist
Specialist

hmmm....

i guess you could potentially write a if statement in the script to force all non North transactions to become Null values but that would make no sense, and would just slow down the load process alot...



....without a where clause in the load script, all loaded data will exist in the data model after the load is complete, and exclusions of regions will have to be done in the user-interface instead by using on-open-triggers or by more or less forced user selections, or in chart expressions by using set-analysis.



Svebeck Consulting AB