Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

QS how to reduce the data ?

Hi All

I have a QS doc , i like to know how can i reduce the data to 2% ?

Binary 'lib://vFOLDER/QV4QS_v18.qvw'; 

I am using Binary load the data , but i like to keep the data confidential , so i want to only read 2% of the data , so that when i post the QVF file , other will not be able to know my original data source

Paul

1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

‌DROP TABLES sales; should do the trick.

IF you get syntax type errors in future searching the community for similar examples and customising them will yeld quicker results for you and also aid your understanding of what you can do in script.

REgards

Andy

View solution in original post

17 Replies
ogster1974
Partner - Master II
Partner - Master II

Go into the debug section of your document and limit the load.

Regards

Andy

paulyeo11
Master
Master
Author

Hi Andy

I have try below step 1 to 3 , and follow by reload the script , But it does not reduce to 2%. Any thing wrong ?

REDUCE LOAD.png

ogster1974
Partner - Master II
Partner - Master II

That will bring through 2 records not 2% of your records.

paulyeo11
Master
Master
Author

Hi Andy

But then after i reload the script with set the limit load of 2 record , it still give me full recode , even i did a save . May i know what script does it add to my script , i mean when i set to 2 , it should have create a script to load 2 record , which i can locate the script,

Paul

ogster1974
Partner - Master II
Partner - Master II

You cannot directly filter on your binary load try this after your Binary load to reduce your data

NewFilteredTable:

NOCONCATENATE

LOAD *

RESIDENT TableNamedInLoad WHERE Your filter Criteria;

DROP TableNamedInLoad;

paulyeo11
Master
Master
Author

Hi Andy

I try your script , i get error massage.

Paulerror filter.png

ogster1974
Partner - Master II
Partner - Master II

Whats the name of your table you are using in your qvw.  you need to replace the name TableNamedInLoad with it.

paulyeo11
Master
Master
Author

Hi Andy

I have change the table name to sales. I have just replace TableNamedInLoad  with sales.

error again.png

When i set the limit load to 10 , i get the error massage below :-

new error msg.png

Can you give me your email , so that i can send you the QVW file ?

Paul

ogster1974
Partner - Master II
Partner - Master II

All the error message is saying is you need to put in a proper filter criteria to reduce your data.

Something like Product='ABC'  I don't know your sales table data structure so don't know your field names.  but basically you need as a basic filter <Fieldname> = <Fieldvalue> to limit your data by that condition.  There are other ways to filter data but this type of basic filter should be enough to get you going.

Regards

Andy