Executing ETL Jobs with groovy - write status of execution to Monitor Window...

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Executing ETL Jobs with groovy - write status of execution to Monitor Window...

      Hello Team,

      I am executing in a ETL groovy job commands. The commands are running well.
      How ever I would like to see in the ETL Monitor if a Job execution fails (bad return code of a command).

      Sample:
      command1="xlsconv -s C:\\Roger\\XLS-Files -d C:\\Roger\\CSV-Files";
      command1.execute().text;


      How can a monitor and display errors in the ETL Job Monitor to see, if this Job failed?
      So return code 0 would display Info "Job executed with no errors".
      If it fails, it would display a warning or Error "Job failed".

      THX :)

      Roger
    • Just found the answer my self :)

      For who is interessed:
      //set command
      command1="xlsconv -s C:\\Roger\\XLS-Files -d C:\\Roger\\CSV-Files";
      //execute programm
      proc = command1.execute();
      proc.waitFor()
      //check return code…
      if ( proc.exitValue() == 0 ){
      LOG.info("Excel to CSV transform with no errors...");
      }
      else{
      LOG.error("Excel to CSV transform failed...");
      }

      RS