Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Job Only fails when run through kitchen/ bat file -- through Spoon, exact thing works

  1. #1
    Join Date
    Sep 2014
    Posts
    175

    Post Job Only fails when run through kitchen/ bat file -- through Spoon, exact thing works

    Okay this one is a bit of a mystery.

    I have a "master job" that runs 4 jobs consecutively. I have a .bat file that Windows Scheduler calls once a day, so the job runs once a day.

    It looks like this:

    kitchen.bat /file "C:\Users\fakefilepath\myjobname.kjb"


    For some reason, this job runs JUST FINE if I run it from the front-end Pentaho "Spoon" interface. It will never fail to run.

    However, if run from the .bat file that calls kitchen.bat and the job name, the fourth job entry in the process will ALWAYS fail at the same step: writing data to a database. The error is

    Error updating batch
    Data Truncation

    Thing is, is the error an actual data truncation? If it were, why does the job run successfully without error when run from the front end? We're talking the exact same job here.

    I converted all my columns to varchar(max) with the exception of a datetime, so unless it's that column (which seems unlikely) -- well, what is going on here exactly?

    I am perplexed.

  2. #2

    Default

    a data truncation mean that your data is larger that the space on the column. I will catch the error on the database step, output it to a file and that might give you a clue of where the problem is.

    Hugo

  3. #3
    Join Date
    Sep 2014
    Posts
    175

    Default

    hborda --- thanks but I'm aware of the issue of data truncation.

    However, I have severe doubts that is the problem.

    For starters, this error is never thrown --- ever -- if I run the job myself. Only through KETTLE does this error come up. For the exact same job. For the exact same data insert.


    It is illogical that the exact same data/ string --- of n characters would one minute be too large, and the next not be, given that it is exactly identical in all ways.

    I have a hunch some other glitch is going on, and this error message is merely a cryptic by-product. I'm stumped at where exactly to begin testing/ investigation. Like I said, any attempts of running the job through spoon.bat itself always succeeds.

    The problem is somehow in running the data through kettle.bat.

    I have tried producing a text file before database insert as well, to see if anything looks wonky. I have not found anything so far.

    This is the only job that really gives me grief (only when run through kettle.bat) --- I have several more, very similar, that all seem to work fine. Hmm. I'll keep looking.

  4. #4
    Join Date
    Jul 2009
    Posts
    476

    Default

    Here are three things to check:

    (1) Does the Windows Scheduler run your .bat file as the same (Windows) user account that you use when you run the job through Spoon?
    (2) What happens if you run your .bat file interactively, i.e. in a Command Prompt window?
    (3) Do you set up any environment variables, such as JAVAMAXMEM, when you run Spoon, that might not be set the same way when the Windows Scheduler runs the job?

    If the Scheduler runs the job as a different user account, you might have a permissions issue, or a database user mapping issue, or something like that.

  5. #5
    Join Date
    Aug 2011
    Posts
    360

    Default

    Or worse, the configuration of the batch schedule is such that you dont wite to the good database

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.