Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: run kettle job in a repository from command line in windows

  1. #1

    Default run kettle job in a repository from command line in windows

    Hi,

    I have defined a file based repository and created all my transformations/jobs inside that rep. when i run kitchen from command line it says "repository not found" but i can find my repository in the repository.xml file. if i try to run the job explicitly as /file:<dir>/jobname.kjb with /norep option, it says "could not read job as its not a file" !!! is there a work around ?!

    thanks in advance

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by Kettlerontheroof View Post
    when i run kitchen from command line
    Please, show your command line.
    So long, and thanks for all the fish.

  3. #3

    Default

    this is my command line,
    c:\pentaho\DI4.4\data-integration\kitchen.bat /rep:"IEG_TEST"/dir:"Pentaho/Test_QA_Repository"/job:"J_LOAD_ICRR_DATAMART"/level:basic > C:\Pentaho
    \Test_QA_Repository\run.txt

    thanks...

    repository.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <repositories>
    <repository> <id>KettleFileRepository</id>
    <name>Test_CMD</name>
    <description>Run_CMD</description>
    <base_directory>C:\Pentaho\Test_Rep</base_directory>
    <read_only>N</read_only>
    <hides_hidden_files>N</hides_hidden_files>
    </repository>
    <repository> <id>KettleFileRepository</id>
    <name>IEG_TEST</name>
    <description>Test Repository</description>
    <base_directory>C:\Pentaho\Test_QA_Repository</base_directory>
    <read_only>N</read_only>
    <hides_hidden_files>N</hides_hidden_files>
    </repository> <repository> <id>KettleFileRepository</id>
    <name>IEG_PROD</name>
    <description>Production</description>
    <base_directory>C:\Pentaho\Production Repository</base_directory>
    <read_only>Y</read_only>
    <hides_hidden_files>N</hides_hidden_files>
    </repository> <repository> <id>KettleFileRepository</id>
    <name>Rep_Delete</name>
    <description>Delete after test</description>
    <base_directory>C:\Pentaho\Rep_Delete</base_directory>
    <read_only>N</read_only>
    <hides_hidden_files>N</hides_hidden_files>
    </repository> </repositories>

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    The /rep commandline parameter indirectly tells kitchen the filesystem folder where the repository is located.
    The /dir parameter, however, must contain the repository internal path, see job configuration setting "Directory" (press Ctrl-J in Spoon).

    If you don't have any internal structure, your commandline would look like this:

    Code:
    kitchen.bat -rep:IEG_TEST -job:J_LOAD_ICRR_DATAMART -level:basic >C:\Pentaho\Test_QA_Repository\run.txt
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    The way you write it, your repository is named "IEG_TEST"/dir:"....
    Take care of spaces where necessary.
    So long, and thanks for all the fish.

  6. #6

    Default

    sorry, i deleted my earlier post !!!
    I ran this cmd line from kitchen.bat dir:
    kitchen.bat /rep:"IEG_TEST"/job:"J_LOAD_ICRR_DATAMART"/level:basic > C:\Pentaho\Test_QA_Repository\run.txt
    it still says,
    WARNING: Using java from path
    DEBUG: _PENTAHO_JAVA_HOME=
    DEBUG: _PENTAHO_JAVA=java.exe
    WARN 26-06 08:56:19,666 - Unable to load Hadoop Configuration from "file:///C:/Pentaho/DI4.4/data-integr...gurations/mapr". For more information enable debug logging.
    INFO 26-06 08:56:19,682 - Kitchen - Start of run.
    INFO 26-06 08:56:19,713 - RepositoriesMeta - Reading repositories XML file: C:\Users\.kettle\repositories.xml
    ERROR: No repository provided, can't load job.
    ERROR: Kitchen can't continue because the job couldn't be loaded.

    it's not able to find my rep, though it's defined in the .xml file !!! am at my wit's end ! :-)

  7. #7
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by Kettlerontheroof View Post
    I ran this cmd line from kitchen.bat dir:
    kitchen.bat /rep:"IEG_TEST"/job:"J_LOAD_ICRR_DATAMART"/level:basic > C:\Pentaho\Test_QA_Repository\run.txt

    it still says,
    ERROR: No repository provided, can't load job.
    Once again: Spaces do matter. Each switch character introducing a parameter must follow a space!
    You may think you specified the repository IEG_TEST, but you didn't.
    Try to execute exactly the following commandline from your Kettle installation folder:

    Code:
    kitchen.bat  /rep:IEG_TEST  /job:J_LOAD_ICRR_DATAMART  /level:basic  >C:\Pentaho\Test_QA_Repository\run.txt
    Mind the gap ...
    So long, and thanks for all the fish.

  8. #8

    Default

    IT WORKED !!! thanks a bunch....never been this spaced out over such a problem !!!

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.