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

partial reload

Does anyone has a complete example of how to use partial reload?

It will be really helpful

Many thanks

9 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't have a "complete example", but, in a nutshell, Partial Reload will only pereforma load statements with prefixes ADD or REPLACE. For example:

LOAD < massive data load of historical data> .....

ADD LOAD <last week's data>

Full Reload will first clear all the database, and then perform both the first and the second load. Partial Reload will not clear the database and will only perform the second load statement.

If you download a shareware "QlikView Explorer" from "Share QlikViews" page, you'll see an example of using Partial Reload for loading a selected QVD file for a preview.

As a warning, though: "Partial Reload" is considered to be a "rudimentary feature" - it was the way to organize incremental loads in earlier versions of QlikView, before the introduction of QVD files. The advice from QlikView developers is to use QVD files for incremental load and stay away from Partial Reload.

Not applicable
Author

Thanks Oleg. It looks like the example has as little of everything.

As I don't have so much experience with QlikView as you have I tried to do something simple.

The problem we have, is that an application takes 2 hours to run and the last hour is charching the same data every day. less the last week of the month, so in order to increase the running speed is we thought about to use Partial Reload.

As I told you, my example is quite simple and I'm sending to you right now. Maybe you can tell me if the concept is wrong.

I have un excel file with two pages, and I used a normal load and I run the application. Then, as I wanted to keep the same data and load a few more, I wrote add to the load sentence and then I run the application again. As you can see in the log files I had not success.

Could please check it and tell me where is the error?

Many thanks

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I can't look into it in detail at the moment, but based on your explanation, it looks like you "run the script" in the same way (using the button "Reload"). If you'd like to run a partial reload, you need to select a menu option "File" - "Partial Reload".

does this solve the problem?

Not applicable
Author

Oleg, you was so rightBig Smile

It was the reload option.

I have another question for you.

I want to use the add option in the whole application , but depending of the type of reload I want to use. Is there a way to recognize this in the script using a variable? So in this way I can use an if sentence for each kind of reload.

Can you suggest me what to do?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Use function IsPartialReload() to determine whether you are running a partial reload or not.

Not applicable
Author

Thanks Oleg.

If I want to do differents load sentences depending of if the reload is partial or not, how I should do it?

eg:

I mean, if I do

if .... then

load

else

add load

end if

field1, field2, field3 from table1;

It will return a sintaxis error

or

if .... then

let a = load .... from ....;

else

let a = add load .... from ....;

end if

How can I execute the variable to load the table?

The thing is that depending of the type of reload, I have to use one load or another, because I have an application with many tables and if we have some kind of error during the run of the prior processes and I should run the same qvw using normal reload or partial reload.

My english is not good so I hope you can understand me.

Well, thanks, again

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you are getting confues by the syntax...

First of all, the addition of the prefix ADD doesn't change the results that you will get from the LOAD when you are running a full reload. In other words:

- Within a full reload, prefixes ADD and REPLACE are completely ignored

- WIthin a partial reload, only statements with ADD and REPLACE will be executed.

If you still want to run a different load statement for Partial Reload, you can do it in two ways:

1. SImply using IF and 2 separate load statements:

IF IsPartialReload() then

add load f1,f2,f3 from ....

else

load f1, f2, f3, f4 from ....

end if

Another way is to build a string variable with the text of the desired load statement. In order to execute it, use $-expansion:

LET vLoadString = 'LOAD ...";

//execute:

$(vLoadString)

good luck!

Not applicable
Author

Thanks . It worked well.

Not applicable
Author

Hi Oleg,

Looked high and low for QlikView Explorer for a while on this site and it does not seem to be there anymore. Do you have a copy that you could share/ re-upload?

Thanks, Alex.