Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

QVW load

Good morning -

I am extremely new to QV and have what is probably a basic question.

My company's BI group creates a refreshed .qvw file everynight and posts it to a shared location.

I then open QV on my local machine and run a binary script to load that .qvw file Binary [\\path\filename.qvw];

Is there a way to modify the binary script so i can limit the fields that are loaded?  I really only need to use about half of the available records. Because i am using my local machine the reduced size would be beneficial.


Thank you.

22 Replies
commonqlik
Contributor II

Re: QVW load

try put write

where condition under binary statment   like

where sales>=10000;

gabriel_kirst
Contributor III

Re: QVW load

Hi.

I believe that it isn't possible to do a "partial" binary load.

One thing that you can do is after the binary load, use "Drop Table" or "Drop Field" to eliminate the data that you don't need.

Hope it helps.

Regards,

Gabriel

Not applicable

Re: QVW load

Hi,

after the binary load you can manipulate all the present tables in your load script so indeed drop fields, tables etc..

hth

F.

Not applicable

Re: QVW load

Thank you for the prompt response.  In this case, i need to keep the tables and fields intact; however, i need to remove about 65% of the records. Is there an equivalent "DROP WHERE" clause?  I'm hoping the solution can be part of the script i run each morning.

Employee
Employee

Re: QVW load

Binary load is an "all or nothing" feature. All your data will be loaded.

You can do an aditional scripting to get rid of data you don´t want

Binary [\\path\filename.qvw];


noconcatenate load * resident T1 where Month='Jan' // just an example

drop table T1

mov
Esteemed Contributor III

Re: QVW load

You can not only drop tables and fields, but reduce data as well after the binary load.  For example:

tmp:

INNER KEEP (TableName) LOAD *          // or just one key field instead of *

RESIDENT TableName

WHERE <any conditions you want>;

DROP TABLE tmp;

isorinrusu
Contributor III

Re: QVW load

Subscribing to what Clever Anjos says, you could also use the FIRST prefix when doing further scripting.

Like this:

FIRST 10000 LOAD * RESIDENT MyTable;

Not applicable

Re: QVW load

Wonderful.  I was unaware of the Resident option.  So if the .qvw loaded is called "MAIN" and i only want the january records it would look like:

tmp:

INNER KEEP (MAIN) LOAD *

RESIDENT MAIN

WHERE date="Jan"

DROP TABLE tmp

And from there i would continue to work within the "MAIN" table, correct?

Employee
Employee

Re: QVW load

Yes, it´s correct

Community Browser