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

setting variables in binary load

HI guys,

I am doing binary load of one QVW file into another one.

I need to set values of some variables like path of my QVD files in the first QVW file before Binary load statement executes in the second QVW file.

Any suggestions on how to do that?

Regards,

Saurabh

11 Replies
Not applicable
Author

Hey Ramya,

If you have publisher you can set up triggers to reload files sequentially.

Like Reload File 1 > Trigger (on successful completion of File1) > Reload File2

here File2 is a binary load of File1.

So File2 wont be reloaded until File1 is complete.

Edit: Also this can be done if you just have server.

Thanks

AJ

Not applicable
Author

Hi,

Binary Load must be the first statement of script,  so nothing can be set or changed before binary load

Binary Load will get any data loaded as is from your binary file

then you can set, load, drop etc. any further ETL after binary load

What would you like to achive if you can elaborate it is better to help ...

Best

Not applicable
Author

Hi Ersen,

The path of my QVD files keeps changing so I need to mention the path of QVD files before binary load.

Saurabh

Not applicable
Author

i just have desktop version.

Not applicable
Author

You have two files right.

  1. File1 set your variables. Reload it.
  2. File2 which has binary load. Reload it.

Is there something that I am missing. Do you want to copy those variables as well from File1 to File2?

Can you please elaborate a little on what the objective is?

Not applicable
Author

Hi,

Binary load statement will not trigger reloading QVDs inside binary qvw.

If you are reloading QVDs after binary load statement you can set paths

after the binary load in the script.

Ersen

SunilChauhan
Champion
Champion

In first QVw file create variable like below

set var=10;

set var1=20;

Load $(var)  as varField,

$(var1)  as varField1

autogenerate 1;

and then use this qvw  into another Qvw .

then you will have varField in second Qvw.

see the attched files

Hope this helps

Sunil Chauhan
maxgro
MVP
MVP

to move variable from first qvw to second qvw (the one with binary load) you can look at these posts

Binary Load - Variables

Binary load and passing Variable(s) with it

Not applicable
Author

Hi Ajay,

Thanks for your reply.

I need to specify the path of my QVD files in my first QVW. This path can change dynamically so I can not hardcode it.

I need to access these variables from outside of QVW and set the values and then need to load the first QVW.

Do you think i need to use automation for it?