Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
PRB6803
Contributor II
Contributor II

MySQL Set command in a Load Script

Good Day

I have a table located in a transactional MySQL Database. On a reasonably regular interval (I reload Hourly) I get the the first field happens to be id can not be found, If I then reload manually it often simply works. My logic says that possibly the table or a row is locked due to a transaction at the moment I try to read. In SQL Server I would have added a "No Lock" which would ignore the row or bring back uncommitted etc.

In MySQL you need to actually set the session or transaction locking "isolation" level prior to execution of the select statement.
When entering the relevant set statement ( SET SESSION ISOLATION LEVEL READ UNCOMMITTED 😉 in my Qlik Sense script the word isolation is highlighted in red thus not recognised.

Is there a way to execute a set command in Qlik Sense as there is in stored procedures something like exec("Set ....."), I don't have access to the transactional server to add a stored proc to call from Qlik Sense as that was an obvious way that I already thought of.

Failing that is there something similar to on-error goto that could force a retry for the specific table, not ideal however seems like an alternate plan. I did look at error handling however what I found simply allows you to switch it off and on so as to at least complete the rest of the script etc. And of course a way of listing based on error code.

Thanks in advance for any ideas

0 Replies