Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jsanchezh
Partner - Creator
Partner - Creator

STORE after reload

Hello,

I would like to know if there is some way I can make a STORE after the script has been run succesfully.

I mean, imagine that I have a process which takes a lot of time to be reloaded and I'm doing some data processing in the script so I can't check it until it's finished. Once it has finished and I have checked the processing is correct, I would like to make an STORE from the "Fact" table without reloading the whole script with a STORE at the end.

Is it possible? Any ideas?

Thanks!

18 Replies
datanibbler
Champion
Champion

Ah. Thanks!

That is a good possibility.

And the partial reload keeps all the previously loaded tables in memory?

That's something new to me. Good to know. Then those keywords aren't necessary because when you give a new table a name that already exists, that table will be overwritten and if you have something to concatenate to an existing table, you can use the CONCATENATE () keyword.

Great!

Thanks a lot!

sunny_talwar

That is not true. Anytime you have a load statement you want to use during partial reload, you need a Add or Replace statement otherwise QV will skip the table even with the IF IsPartialLoad() statement in place.

sunny_talwar

I have posted a qvw file which you might find useful. Have a look here:

Re: Is that possible to Append/Add data to QlikView Application based on user request.

Best,

Sunny

datanibbler
Champion
Champion

Ah,

so the two have to go together,

- the ISPARTIALRELOAD() query at the beginning to enter into one of two branches

- the keywords ADD or REPLACE

?

I didn't know that.

But any previously loaded tables are kept in memory, aren't they?

I'll test that.

Best regards,

DataNibbler

datanibbler
Champion
Champion

Cool!

At first it didn't work at all - but in that app, there was a BINARY LOAD before that construct.

It also seems that you have to query the

>> NOT ISPARTIALRELOAD() << first and then the >> ISPARTIALRELOAD() <<, no?

When I tried on a small dummy file with the ADD keyword, it worked that way round.

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi



if you hit the Partial Reload then it would tell the statement IF IsPartialReload() then to be TRUE and when you do a Regular Reload it would tell it to be FALSE.



Reagrds,

Nagarjuna

datanibbler
Champion
Champion

That is a cool tool for the development process.

When you have a script that takes a while to reload and you can tell exactly where there is an error, you only need to reload that bit - so you use that PartialReload() functionality and write the REPLACE keyword just in front of that one LOAD. That way all the others will remain untouched and the whole thing will be a lot faster.

sunny_talwar

So let me take a shot at explaining the whole partial reload thing. Lets look at different scenarios:

Scenario 1:

Table:

LOAD *

FROM xyz;

Table1:

NoConcatenate

LOAD *

Resident Table;

DROP Table Table;

If you do a partial reload first two table loads will not be loaded (since they don't have Add or Replace next to them), but the DROP Table Table statement will execute. Similarly regular or partial reload DROP, LET, SET statements will always run unless you have a IF IsPartialReload() Statement to stop them from running.

Scenario 2:

Table:

Add LOAD *

FROM xyz;

Table1:

NoConcatenate

Add LOAD *

Resident Table;

DROP Table Table;

Both tables will only run when you do a partial reload and won't run on the regular reload, but the DROP statement will during the regular reload giving you an error that Table doesn't exist.

Scenario 3:


Table:

LOAD *

FROM xyz;

IF IsPartialReload then

     Table1:

     NoConcatenate

     Add LOAD *

     Resident Table;

     DROP Table Table;

ENDIF;

Now the DROP statement will only run when you are doing a partial reload. To answer your question, the tables loaded through a regular reload can be accessed (concatenated to, joined to, resident from, keep to) during the partial reload.

I hope this would clarify a lot of your doubts (if not all)

Best,

Sunny

datanibbler
Champion
Champion

Hi sunindia,

indeed that clarifies a lot!

So if I want the first table to be loaded on a regular reload, but not the second one, while the second one (both in fact) is only loaded in a partial reload, I have to use that IsPartialReload() clause. Otherwise, I can only have both table load on a regular reload or none. At least that seems to be the case. I just tried.