Hitachi Vantara Pentaho Community Forums
Results 1 to 12 of 12

Thread: Carte - Have a user execute a transformation though browser

  1. #1

    Default Carte - Have a user execute a transformation though browser

    Hello.

    I have never dealt with Carte before and haven't found a lot of information therefore I'm not sure I can do what I'm looking for with it. So here's my scenario.

    I have a transformation that creates a file based on two parameters (Start/End date). I would like some users to be able to execute that transformation by themselves whenever they want. So I was wondering if I could use Carte to do so by giving my users a URL to use and specify their parameters and the file will be generated on the network as per their requirements.

    Is it something possible or there's really something I didn't understand properly in the functionnality of Carte?

    Any help would be appreciated. Thanks.

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

    Default

    Just add the parameters to your URI:

    Code:
    http://your-carte-server:8081/kettle/executeTrans?trans=/remote/folder/test.ktr&startdate=20130101&enddate=20131231
    Remember to properly escape special characters if necessary.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    If you set up a repository, you can also use the runTrans service:

    http://wiki.pentaho.com/display/EAI/Carte+Configuration

    See the Repository section.

  4. #4

    Default

    Thanks Marabu.

    It works fine when I copy the transformation in PDI directory but when I try to pass the directory (Windows) of my transformation in the URL it doesn't work. I've tried escaping the backslash and semicolon but that doesn't work

    Let's presume my directory where my transformation reside is E:\Kettle\Transformations what should be the URL ?

    Thanks again for your help.


    Quote Originally Posted by marabu View Post
    Just add the parameters to your URI:

    Code:
    http://your-carte-server:8081/kettle/executeTrans?trans=/remote/folder/test.ktr&startdate=20130101&enddate=20131231
    Remember to properly escape special characters if necessary.

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

    Default

    With servlet executeTrans you must address your transformation in a split way: Parameter rep indicates the base directory via a Kettle repository, and parameter trans has the absolute pathname of a transformation in that repository.
    If you don't provide a repository in your URI, the Kettle directory is used as the base directory.
    So if you define a filesystem based repository FOO pointing to E:\Kettle\Transformations, and you store a transformation test.ktr as /bar/test, your URI would look like

    Code:
    http://your-carte-server:8081/kettle/executeTrans?rep=FOO&trans=/bar/test&startdate=20130101&enddate=20131231
    As Matt pointed out, Carte version 5.0 recognizes a repository element in its configuration file, which is used by the new runTrans servlet, doing away with the rep parameter in your URI.
    So long, and thanks for all the fish.

  6. #6

    Default

    So what you're saying it that I absolutely need a repository, either file based or within a database? I can't use carte if I only save indiviual .ktr files here and there? (E:\Kettle\Transformations\MyTransfo.ktr as in my example).

  7. #7
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    executeTrans does not require a repository but runTrans does.

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

    Default

    Quote Originally Posted by mblondinde View Post
    So what you're saying it that I absolutely need a repository, either file based or within a database?
    I said so and I was wrong in using the word "must", as Matt emphasizes.

    Quote Originally Posted by mblondinde View Post
    I can't use carte if I only save indiviual .ktr files here and there? (E:\Kettle\Transformations\MyTransfo.ktr as in my example).
    You can. Just insert your full path info as in the example from posting #2:

    Code:
    http://your-carte-server:8081/kettle/executeTrans?trans=E:/Kettle/Transformations/MyTransfo.ktr&startdate=20130101&enddate=20131231
    Don't repeat my mistake, make sure you append the file extension when omitting the rep parameter.
    So long, and thanks for all the fish.

  9. #9
    Join Date
    Oct 2013
    Posts
    22

    Default

    If you have a job and execute like in the browser, you have to use repository there is now way to execute a job now from a file .KJB. i think there is a JIRA out in pentaho said they are going fix in release 5.1

    Thanks

  10. #10
    Join Date
    Feb 2014
    Posts
    4

    Default

    If I wanted to use the runJob web service for carte, how would I specify the option to expand the remote job on the server?

  11. #11
    Join Date
    Oct 2013
    Posts
    22

    Default

    If you need to use Carte to run job use: http://<SERVER WHERE CARTE RUNNING>/kettle/runJob/?job=<JOB NAME INCLDING PATH WITHOUT .kjb EXTENSION>&level=Detailed
    and monitor via carte web browser...

    Hope this helps

    Thx
    Balaji

  12. #12
    Join Date
    Sep 2014
    Posts
    7

    Default

    Quote Originally Posted by vishbalaji View Post
    If you need to use Carte to run job use: http://<SERVER WHERE CARTE RUNNING>/kettle/runJob/?job=<JOB NAME INCLDING PATH WITHOUT .kjb EXTENSION>&level=Detailed
    and monitor via carte web browser...

    Hope this helps

    Thx
    Balaji
    Jesus, thank you, life saver, wasn't able to figure out how to get it working on 8.1.

    Thank you very much!

Tags for this Thread

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.