Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Abort Job without error if "Execute SQL Statements" fails

  1. #1
    Join Date
    Nov 2017
    Posts
    10

    Default Abort Job without error if "Execute SQL Statements" fails

    I've got a strange issue that I'm hoping someone can help with.
    We have many jobs scheduled concurrently that all call the same set of jobs/transformations.
    The first step, is to update a row in a queuing table. The problem is that we're getting row locking from time to time because two different jobs are trying to pick the same row in the queue (and change it's status).
    What I'd like to do is that if a row is locked (causing a SQL error: Error committing transaction: updates conflict with updates in another transaction.) that the job just abort without error.
    We are getting many rows in our /kettle/status page that shows false positive errors. I mean they're actual errors, we just don't care about them.
    If one fails, the next one will pick it up if it's not locked. Not a huge deal.
    So, is there a way to have the job abort (without) error if the SQL error occurs?
    Thanks!

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Run your "Negative" path from the step you want to ignore to a "Dummy" step. Since the Dummy will exit OK, the overall Job will finish with a status of OK.

  3. #3
    Join Date
    Nov 2017
    Posts
    10

    Default

    Thank you for the response, will try that and let you know if it works.

  4. #4
    Join Date
    Nov 2017
    Posts
    10

    Default

    Jobs are still stepping on each other.
    Let me ask you this. Is there any way to tell the scheduler not to spawn a new job until the current one completes?

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Not that I know of, but you could use a "Token File" that gets looked for at the beginning of the job - if it exists, go to dummy and end (Successfully). If it doesn't exist, create it, run the rest of the job, delete it and end (Successfully)

  6. #6
    Join Date
    Nov 2017
    Posts
    10

    Default

    Ended up going with a lock file approach on the server to keep processes from stepping on each other.
    Here's the link that laid it out for me:
    http://type-exit.org/adventures-with...-a-kettle-job/
    Worked great.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.