Forum

Kognitio Console issues, advice, etc.
Contributor
Offline
Posts: 184
Joined: Wed May 29, 2013 2:10 pm
Location: Bracknell

Kog Scripts: how do I ignore SQL errors?

by MikeAtkinson » Tue Jul 16, 2013 8:34 am

When I'm running a Kog Script, sometimes I want to ignore errors returned from a SQL statement. For example I'm creating a table that already exists.

How do I ignore them in Kognitio Console?

How do I ignore errors in the KogScript utility?
Reply with quote Top
Contributor
Offline
Posts: 184
Joined: Wed May 29, 2013 2:10 pm
Location: Bracknell

Re: Kog Scripts: how do I ignore SQL errors?

by MikeAtkinson » Wed Jul 17, 2013 5:18 pm

Within Console errors may be ignored by using the "Script Error Handling" configuration option.

Say you want to ignore Table <table> does not exist" errors which have an error code of CI3013. Addthis value into the "Script Error Handling" configuration option.

Then even if the "On Server Error:" option is set to "Stop" or "Debug", Console will not break on the error.
Reply with quote Top
Contributor
Offline
Posts: 184
Joined: Wed May 29, 2013 2:10 pm
Location: Bracknell

Re: Kog Scripts: how do I ignore SQL errors?

by MikeAtkinson » Thu Jul 18, 2013 8:21 am

Within the KogScript command line utility it is not currently possible to ignore specific errors.

Setting the error_mode variable allows all errors to be ignored.

The error_mode is assigned a string, made up of three parts:
<onerror> [ ; <transaction> ] [ ; <exitcode> ]
Where:
<onerror> = "continue", "stop", "debug" or "exit", default="continue"
<transaction> = "rollback", "commit" or "none", default="none"
<exitcode> = "success", "failure" or "failure=n", default="success"
For example:

Code: Select all

error_mode='continue;rollback;'

Code: Select all

error_mode='exit;rollback;failure=9'
Reply with quote Top

Who is online

Users browsing this forum: No registered users and 1 guest

cron