Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Strange issue with a PARTIAL RELOAD

Hi,

I have a problem implementiong a partial reload, which Tresesco helped me solve - or so I thought, I thought it was fine - but seemingly it is not, and I cannot spot the issue:

I now go right from the very leftmost tab, the "Main" tab of the script, and I go further step by step and move the EXIT command one line at a time.

That works fine for a while in very small steps - and then, all of a sudden, QlikView reports (in the partial reload) an error in the ELSE branch of an IF_THEN clause, then with the ENDIF - but in that part I have last moved the EXIT, there is no IF_THEN clause ...

=> So it must be somewhere prior to that? But I already checked all that - as I said, I go forward in very small steps by now because this issue has been bothering me for a while ...

I know that sometimes QlikView reports errors because of a script_line even if it is behind an EXIT - but I know there is no scripting_error, I just took the live version and made a fresh copy of that to work on, so there cannot be an error ...

Can anyone help me there?

Thanks a lot!

Best regards,

DataNibbler

1 Solution

Accepted Solutions
datanibbler
Champion
Champion
Author

Well,

the partial reload as such now works. Some loop somewhere must have broken down, I get only one record in the chart on the GUI where there should be ten and the like ... but I will find that, it has happened before, and I have worked and changed so much for the partial reload, I must have "flicked a switch" somewhere without remembering ...

Best regards,

DataNibbler

View solution in original post

15 Replies
sunny_talwar

What is the exact script you are using?

datanibbler
Champion
Champion
Author

Hi Sunnc,

I'm sorry, I was already gone on Friday - different time_zones 😉

It would be very complicated to show you the entire script as I have a shitload of INCLUDE files there and the issue could theoretically be in any one of them - I introduced those to improve the performance of the entire installation and make it more manageable - once upon a time we had big plans about what to do with QlikView ...

Right now I'm into something else, but I will have a look and see what the issue is - I tend to forget some details on the weekend as this is kind of like "Bundeswehr" - leave your brain at the door 😉  - and then I'll see what I could show you to help you help me.

Best regards,

DataNibbler

datanibbler
Champion
Champion
Author

Hi,

the first two tabs are quite simple:

- On the "MAIN" tab, apart all the default settings, I have a code to set a variable which I can see on the GUI, just to tell me whether the

  reload was regular or partial, because I cannot see it in the Debugger.

- On the next tab, I have code for resetting several variables - I had made a habit out of resetting every variable when it was not needed

  anymore; There are some variables which are needed on the GUI, so I cannot reset them at the end of the script, so I do it at the

  beginning.

- Then comes one tab with two INCLUDE files, but there are only a lot of file_paths in those; No potential for errors there.

- The fourth tab is more interesting, there are three INCLUDE files there, two have some code in them with a LOAD among others.

  However, I have also added the REPLACE keyword to those LOAD statements because it doesn't do any harm in a regular reload.

I will go through those four tabs for starters, move the EXIT SCRIPT command further stepwise and see if it works that far.

Gysbert_Wassenaar

A missing semicolon after a statement perhaps? Or a missing quote.


talk is cheap, supply exceeds demand
datanibbler
Champion
Champion
Author

Hi Gysbert,

yes, that's what I thought - the strange thing was that I checked bit by bit and everything was okay - okay - okay - and all of a sudden, the script reported an error in both full and partial reload, when within the last "step" of the EXIT statement, there was nothing that could have generated that specific error ... well, let's see. Monday is often different.

Gysbert_Wassenaar

It could also be a variable that doesn't get the right value and becomes null instead.


talk is cheap, supply exceeds demand
datanibbler
Champion
Champion
Author

Hmmm ... up to the fourth tab, everything works fine.

Judging from the error_message, which was about an IF_THEN_ELSE_ENDIF statement, the second INCLUDE file would be the most probable place for the error to hide: It is a BACKUP code. I will attach it. This "decides" whether or not the qvw was moved to a backup_directory and if it was, the script is ended, so the app is emptied of all data and a lot smaller. That decision is made using just such an IF_THEN_ENDIF clause - there is no ELSE actually.

The strange thing is, no error is reported when I place the EXIT right behind this INCLUDE, neither in regular nor in partial reload - everything is still fine.

datanibbler
Champion
Champion
Author

Fifth tab - there is the following code here (so that when I start the script without using the buttons on the GUI, the variable defining the order of script_execution can be set at will).

Now comes the error_message, but now it's only in a partial reload.

Oh - guess I need the keyword REPLACE here, too, do I ...

>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

IF $(e_admins_only_v3) THEN // This is a condition that was constructed in one of the INCLUDE files on the last tab, it returns either TRUE or FALSE
Temp:
LOAD Input('Variable specialtask', 'Variable zur Steuerung des Skriptlaufs manuell setzen?') as Usermsg AutoGenerate 1;
LET v_specialtask = PEEK('Usermsg');
// Jetzt brauchen wir diese Tabelle nicht mehr und löschen sie gleich wieder, damit
  // alles schön aufgeräumt bleibt.
  DROP TABLE Temp;
ENDIF

Strangely, the first error_message is reported rgd. an ELSE branch which, as you see, is not there. It cannot be in any of the prior INCLUDE files bedause I have checked all those step by step.

P.S.: INCREDIBLE - the moment you do it all right, it works 😉

datanibbler
Champion
Champion
Author

O_O - on one of the following tabs, there is a new issue:

I have a SWITCH_CASE statement there because one table has to be loaded from a qvd, and the report is to be used by people in two separate plants we have, and the fields in those qvds are named a little different:

- The tables are Receiving_Header and Receiving_Body.

- In plant 64 (the first CASE branch of the SWITCH statement), the fields are all qualified with

  >>Receiving_Header<< and >>Receiving_Body<<

- In plant 74 (the DEFAULT branch of the SWITCH statement, there are only two possibilities), the fields are

   all qualified with >>Rcv_Hdr<< and >>Rcv_Bd<<

- This difference is of course unpractical, but I rename all fields in the first LOAD to make the names the same so I

   can further process the data.

Oh - it could be that in a partial Reload those tables are for some reason not reloaded at all - I have just tried out both alternatives and looked at the log_file afterwards and that is what it seems like ...