Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: adding a job in carte

  1. #1
    Join Date
    Apr 2008
    Posts
    2

    Question adding a job in carte

    Hello, in need some help with my code. I tried to start a job in carte.class jsut like a transformation. My transformation works fine, but if i activate the code for thr job, carte wont start.puh.. i think i need some help.so i insert is followed.
    thanks al lot
    //job
    InputStream inputStream = KettleVFS.getInputStrea,("file:///usr/local/datamining/kettlespoon/foobar/INTEX.kjb" ); StringBuffer xml = new StringBuffer(); int c; while ((c=inputStream.read()) != -1) xml.append((char)c); JobConfiguration jobConfiguration = JobConfiguration.fromXML(xml.toString()); JobMeta jobMeta = jobConfiguration.getJobMeta();
    JobExecutionConfiguration jobExecutionConfiguration = jobConfiguration.getJobExecutionConfiguration(); j
    obMeta.setArguments(jobExecutionConfiguration.getArgumentStrings());
    Repository repository = jobConfiguration.getJobExecutionConfiguration().getRepository(); Job job = new Job(LogWriter.getInstance(), StepLoader.getInstance(), repository, jobMeta);
    job.initializeVariablesFrom(null); job.getJobMeta().setInternalKettleVariables(job); job.injectVariables(jobConfiguration.getJobExecutionConfiguration().getVariables()); jobMap.addJob(jobMeta.getName(), job, jobConfiguration);
    //Job
    Last edited by fw_team; 09-05-2008 at 10:06 AM.

  2. #2

    Default

    Please include some newlines to provide readable code.
    And there is a "Preview Post" button...
    21 is only half the truth

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.