Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

jsanchezh
Contributor

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!

Tags (3)
1 Solution

Accepted Solutions

Re: STORE after reload

I was going to put on the same path of using the Partial Reload functionality. You can do something like this:

IF not IsPartialReload() then

     your originalreload script with your fact table

ENDIF;

IF IsPartialReload() then

     STORE FactTable into ..... qvd (qvd);

ENDIF;

HTH

Best,

Sunny

18 Replies
datanibbler
Esteemed Contributor

Re: STORE after reload

Hi jsanchezh,

that should be possible by way of a PARTIAL RELOAD where only some parts of the script are executed during the reload and the ´memory is not completely emptied at the start of the script - but I have heard that function is still kind of whacky and doesn't always work.

A possibility would be if you run that app locally (not possible on server) and you can somehow implement your checks in the script itself, you could include some TRACE statements and generate an input box to ask you if you want to STORE the results or not.

Apart from that, I don't know any possibility.

HTH

P.S.: The input box (it's a function) generates a variable out of your input. You could then use that variable to decide whether or not to execute the STORE command.

Re: STORE after reload

I was going to put on the same path of using the Partial Reload functionality. You can do something like this:

IF not IsPartialReload() then

     your originalreload script with your fact table

ENDIF;

IF IsPartialReload() then

     STORE FactTable into ..... qvd (qvd);

ENDIF;

HTH

Best,

Sunny

datanibbler
Esteemed Contributor

Re: STORE after reload

Hi sunindia,

apparently you already got the PARTIAL RELOAD working?

I read up on it once, the trigger-words are "REPLACE" and "ADD" in front of a LOAD, no?`

Otherwise, how do you set the variable that the IsPartialReload() function queries?

Thanks a lot!

Best regards,

DataNibbler

Re: STORE after reload

I have not tested this particular case where its been used for storing, but since you mentioned I am going to do a test load and come back to let you know if it worked or not.

Best,

Sunny

Re: STORE after reload

It is working. PFA a sample qvw file.

I think since I am not LOADING a table, I don't need Add or Replace keywords. I am just using an existing table to store into a qvw and hence I don't need those keywords.

HTH

Best,

Sunny

datanibbler
Esteemed Contributor

Re: STORE after reload

Hi,

OK, I only ever tried with those keywords and it didn't work. But if you haven't got any keywords, how is that variable set that the function IspartialReload() queries? Somehow that has to be set to TRUE or FALSE. How is that done?

Re: STORE after reload

So when 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. At least that's how I interpret it.

Best,

Sunny

datanibbler
Esteemed Contributor

Re: STORE after reload

Hi,

I don't know that there is an option to reload the script only partially. How can I do that? The regular reload is triggered by hitting Ctrl+R, and the partial one?

Does the user have to decide at the outset what to do?

Re: STORE after reload

You can use Ctrl + Shift + R or you can use the file menu to do it. Take a look at the image below:

Partial Reload.png

Community Browser