Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
myself
Contributor II
Contributor II

Error Handling

Hi,

I am doing error handling for two tables. In the process I have intentionally created an error in the sql script of one of the loads, but for my surprise error is thrown in that query that i have created an error and all subsequent sql queries for other loads . I have used Error mode=0 after every load. 
I want other sql queries to successfully complete even if there is an error in the previous sql query.

I am using oracle db.

Labels (2)
2 Solutions

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

After the first SQL statement, try adding a duplicate 'LIB CONNECT' statement.  Maybe it will reset the database cursor and not get stuck on the old error. 

View solution in original post

myself
Contributor II
Contributor II
Author

Thanks @JonnyPoole might be a simple thing but helped me a lot. Working good.

View solution in original post

6 Replies
BenjaminT
Partner - Creator
Partner - Creator

Could you share some sample script? You mention using set ErrorMode = 0 after every load but you should set it before.

JonnyPoole
Former Employee
Former Employee

I haven't had experience with this issue.  Could you share the script clearly showing the errormode setting, the faulty SQL and the working SQL?  

I *wonder* if you have to reissue another CONNECT statement prior to retrying the SQL?  You can test this theory by loading a generic inline table after the failed SQL? If you add the following does this work and still fail at the next SQL? If yes then try adding another CONNECT. Just guessing.. 

 

Delete:

LOAD * INLINE [Delete];

DROP TABLE Delete;

MatheusC
Specialist
Specialist

See also the solution in the post below:

https://community.qlik.com/t5/New-to-Qlik-Analytics/Can-a-file-be-ignored-in-a-load-and-not-fail-the...

Regarts, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
myself
Contributor II
Contributor II
Author

myself_2-1712247701932.png

 

Test field is not there in the database, I have added it to create an error in the above load. But second query is also showing an error.

After adding the test field, the error was as shown below

myself_3-1712248047614.png

myself_4-1712248080695.png

 

 

 

JonnyPoole
Former Employee
Former Employee

After the first SQL statement, try adding a duplicate 'LIB CONNECT' statement.  Maybe it will reset the database cursor and not get stuck on the old error. 

myself
Contributor II
Contributor II
Author

Thanks @JonnyPoole might be a simple thing but helped me a lot. Working good.