Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Appending two tables loaded from QVD files

Hi all,

I am quite new to Qlikview and so far managed to get by with what I've learnt at the training course, from the Help and from the forum (mainly from the forum). However, I'm a bit puzzled with something - I am trying to perform LOAD from two different QVD files at different times, but I'd like to merge them/concatenate them together.

For example, the first time I perform a load from the QVD file, I'll just do a normal load and keep the table Item_info_first, as shown in the 'else' part of the code sample. The next time I perform a reload, I'd like to load from a different QVD file and load id in table Item_info_incr, as shown in the 'if' part. I need to concatenate the two - they have identical fields. In other words, I need to append the second load to the first one somehow.

Whatever I've tried hasn't worked and it seems that I can only concatenate/append loads if they're performed one after another in the script, not at different times. Is that correct? Does anybody know if there's a way to do what I need to do?

I have tried and managed to get it going using 'add only load' and performing 'partial reload', but I need this to work through the scheduler and the management console, not through the UI and by running Qlikview application. As far as I can see, there's no way to do that.

Any thoughs or input will be greatly appreciated after spending few hours today trying to figure it out.

Regards,

Katerina


if filesize('file.qvd') > 0 then
Item_info_incr:
LOAD item1, item2
FROM item_info_Tue.qvd (qvd);
CONCATENATE (Item_info_first) LOAD * RESIDENT Item_info_incr;
drop table Item_info_incr;
else
Item_info_first:
LOAD item1, item2
FROM newfile.qvd (qvd)
where Year > 2000;
end if


1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Yes, that's correct. The partial reload option is only available with Publisher Enterprise. However, you can create a batch reload that does a partial reload and schedule it using Windows event scheduler. The syntax for this would be:

"C:\Program Files\QlikView\Qv.exe" /rp "C:\myfile.qvw"
where C:\myfile.qvw would be the path to your file. Note that with Publisher Enterprise you can also schedule command line reloads...

Good luck,

View solution in original post

6 Replies
vgutkovsky
Master II
Master II

Katerina,

I don't think there's a way to do that. I'm assuming the reason you want to do this is because the QVD changes after the first load. What I would recommend is to output during the first load right after you input. Meaning, after the load, store the table into a temp QVD. Then, during the second load, load from the temp QVD and then concatenate load the newfile.qvd.

Regards,

Not applicable
Author

Thanks Vlad. I figured out you can do that, but that's exactly what I'm trying to avoid - loading the table from the QVD file takes quite long (3.8 million records take about 30-40 seconds) and that too slow for what we're trying to do - and it's only going to get bigger when we go live.

I thought having loaded the table once before, you can then manipulate what happens with it, but seems like it's not possible.

Thanks,

Katerina

vgutkovsky
Master II
Master II

Katerina,

I think I understand what you're saying. The good news is that it's possible to do a partial reload through Publisher. Assuming you are using 9.0, open your task in QEMC and on the Reload tab you will see an option for "Partial Reload."

Hope this helps,

Not applicable
Author

Vlad, we are using V9 but only Qlikview server (not Publisher). Through the QEMC and the Reload tab I can only see options to set up a normal/full reload at certain time intervals, nothing about 'partial reload'. Is that a feature only if you have Publisher licence?

Thanks, Katerina

vgutkovsky
Master II
Master II

Yes, that's correct. The partial reload option is only available with Publisher Enterprise. However, you can create a batch reload that does a partial reload and schedule it using Windows event scheduler. The syntax for this would be:

"C:\Program Files\QlikView\Qv.exe" /rp "C:\myfile.qvw"
where C:\myfile.qvw would be the path to your file. Note that with Publisher Enterprise you can also schedule command line reloads...

Good luck,

Not applicable
Author

Hi Vlad,

I have been successfully able to use your script and reload the file however I am getting a problem, I am using a leased licence from the server and I have to manually press the continue button to reload the data. Any advices on the workaround.

Regards,

Kingshuk