Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: WebServices question

  1. #1
    Sebastien Cesbron Guest

    Default WebServices question

    Hi,

    We have developed a first version of a web services step. We are not kettle
    experts so we are not sure how this plugin has to work.

    Working with web services there is inputs and outputs. For the same web
    service it is possible to have both input and output which works on
    different data (so different rows).

    For me kettle input refers to web service parameters. Kettle output refers
    to web service result.

    Web service parameters can be of two types : something to parameterize the
    output, some input the service has to deal with (to import data into the
    system).

    On of my concerns with the web service plugin is how to deal with these
    parameters. There is two possible solutions :

    1. Dynamically generate the plugin interface to show the parameters
    2. Use an input row as web service parameters.

    The first solution is very easy to use but I'm not sure that it is the
    Kettle way of thinking
    The second solution is more powerful but it leads to some questions :

    1. What to do if there is multiple input rows ?
    2. How to distinguish between input data and parameters ?

    Another problem : how to mix both input parameters and input data ?

    I don't know if I am clear. Please tell me if you don't understand what I
    say. My main goal is to open a discussion on this list on how the web
    service plugin have to be designed to be the more kettle friendly it could.

    Other weird point on this plugin :

    - The plugin has to wait the end of the invocation before sending the
    first row to the next step. This is not the case for the other plugins
    - There is two row descriptions for one step : one for the input rows
    another for the output rows : I think this is the only step to do so.

    Regards

    Seb

    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers-unsubscribe (AT) g...oups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

  2. #2
    Matt Casters Guest

    Default RE: WebServices question

    Hi Sebastien,

    It is indeed possible to have multiple input streams into a single steps,
    all with different row layouts.
    The steps that deliver all these input streams are called "info steps".
    So you will find a method in the StepMetaInterface :

    /**
    * @return the informational source steps, if any. Null is the default: none.
    */
    public String[] getInfoSteps();

    Incidently, arrows from infosteps are drawn in yellow so that you see in the
    GUI what's going on.
    Examples of this behaviour is found in the Stream Looup step, Merge rows,
    Merge Join.
    In the step itself you can read from a certain info step with the following
    method in BaseStep:

    /**
    * This version of getRow() only takes data from certain rowsets We select
    these rowsets that have name = step
    * Otherwise it's the same as the other one.
    */
    public synchronized Row getRowFrom(String from)


    Doing the exact oposite of that (writing to certain target steps) is
    serviced by the following method in StepMetaInterface:

    /**
    * @return the chosen target steps, if any. Null is the default:
    automatically chosen target steps.
    */
    public String[] getTargetSteps();

    As you can guess, the method to write to those steps is also in BaseStep:


    /**
    * This version of getRow() only takes data from certain rowsets We select
    these rowsets that have name = step
    * Otherwise it's the same as the other one.
    *
    * @param row the row to send to the destination step
    * @param to the name of the step to send the row to
    */
    public synchronized void putRowTo(Row row, String to) throws
    KettleStepException

    The typical example of naming output steps is the Filter Rows example.

    All that being said, it's one thing to write the logic to execute multiple
    info & target steps, it's another to invent a truly intuitive GUI for it.
    I think the system you guys invented with the tabs inside the dialog might
    be a possible solution.

    All the best,

    Matt



    _____

    From: kettle-developers (AT) googlegroups (DOT) com
    [mailto:kettle-developers (AT) googlegroups (DOT) com] On Behalf Of Sebastien Cesbron
    Sent: Tuesday, February 27, 2007 2:16 PM
    To: kettle-developers (AT) googlegroups (DOT) com
    Subject: WebServices question


    Hi,

    We have developed a first version of a web services step. We are not kettle
    experts so we are not sure how this plugin has to work.

    Working with web services there is inputs and outputs. For the same web
    service it is possible to have both input and output which works on
    different data (so different rows).

    For me kettle input refers to web service parameters. Kettle output refers
    to web service result.

    Web service parameters can be of two types : something to parameterize the
    output, some input the service has to deal with (to import data into the
    system).

    On of my concerns with the web service plugin is how to deal with these
    parameters. There is two possible solutions :


    1. Dynamically generate the plugin interface to show the parameters

    2. Use an input row as web service parameters.

    The first solution is very easy to use but I'm not sure that it is the
    Kettle way of thinking
    The second solution is more powerful but it leads to some questions :


    1. What to do if there is multiple input rows ?

    2. How to distinguish between input data and parameters ?

    Another problem : how to mix both input parameters and input data ?

    I don't know if I am clear. Please tell me if you don't understand what I
    say. My main goal is to open a discussion on this list on how the web
    service plugin have to be designed to be the more kettle friendly it could.

    Other weird point on this plugin :


    * The plugin has to wait the end of the invocation before sending the
    first row to the next step. This is not the case for the other plugins

    * There is two row descriptions for one step : one for the input rows
    another for the output rows : I think this is the only step to do so.

    Regards

    Seb






    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers-unsubscribe (AT) g...oups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

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.