Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zanu_zarina
Contributor II
Contributor II

Retry Mechanism

In my dash board i am trying to connect the retry mechanism but it is not working below is the code what i am using (using the REST connection)

Set Retrycount=4;

Set LocalscriptErrorcount=0;

Do

Set ScriptErrorCount=0;

Lib Connection..................

<   MY Script  >

Drop Table;

IF ScriptErrorCount>0 Then

Let LocalScriptErrorCount=$(LocalScriptErrorCount)+1;

Else

Set LocalScritpErrorCount=0;

End IF

Loop while Mod(LocalScriptErrorCount,Retrycount)<>0; 

can you please help the code

 

Can you please help me the correct code.I am explain very clearly i have connection,In that it is running 100 Quries.

1,2,3.....................100.The query is running up to 70th after that connection is failed so i have to apply the Retry mechanism Here .It will be start from the 70th query not from the 1st could you please explain the code please?

Labels (1)
3 Replies
Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hi Zanu,

 

To prevent the script from failing check ErrorMode=0

https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ErrorVari...

To detect if an issue occurred during the load simply check if you fetched data with your connect/load statement.

 

I hope that helps!

Kind regards,

S.T.

zanu_zarina
Contributor II
Contributor II
Author

Hi Stoyan,

But my scenario is when the connection failed automatically it retry the connection where it is failed?can you help me regarding?

simonaubert
Partner - Specialist II
Partner - Specialist II

Hello,

Two things :
1/ do not forget to add a custom log output to have an idea of how many time you had to retry.

2/ there is this idea to implement retry at query as an option : https://community.qlik.com/t5/Ideas/Custom-Properties-Bulk-Load/idi-p/1767384

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision