Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Using something other than file/db as input source?

  1. #1

    Default Using something other than file/db as input source?

    Hello all,


    Simple question: Is it possible to have a input source that didn't originate from a file or a database?



    The scenario that I envision:

    <hr />
    I am using kettle embedded in a server that I have running. That server receives an XML document via some external request (web service call, jms message, etc). This document contains the information that I want to be a data source for a transformation.
    <hr />


    Now, I know that I could write the XML string out to a text file that I could then use for input, but I was wondering if this could be done without the intermediate step.



    I've looked through the documentation and I didn't see a 'Step' for this.



    Thanks in advance for your response,
    James

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

    Default RE: Using something other than file/db as input source?

    James,


    This most certainly can be done. You need to construct the rows you want to pass to Kettle although this is very easy.
    (Row.addValue() ...)



    Then you need to pass the rows to the transformation. You can either write your own plugin for this or re-use stuff like "Get rows from result" or simply a Dummy. Calling the "putRow()" method of a running step is basically all you need to to. Trans is already running in a different thread, so yeah very feasible. At the end you call setOutputDone() and stop the step. (see source code of Dummy)



    All the best,



    Matt

  3. #3
    Join Date
    Sep 2005
    Posts
    1,403

    Default RE: Using something other than file/db as input source?

    Matt,


    Thanks for the quick response.



    You are really helping me grasp kettle reality



    James

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.