Customer Portal

Referencing input arguments in System Execute

Comments 4

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi daitienshi,

    please see attachment. Basically it work as this:
    * all records sent to SystemExecute are collected
    * then serialized into string and used as STDIN for your command
    * if you need to handle dynamic parameters for your executables, you need to prepare bash script, which reads STDIN and convert it into parameters

    In exaple graph is first branch for unix and second for windows.
  • Avatar
    daitienshi
    0
    Comment actions Permalink
    Hi Jarek,

    Thanks for your quick reply.
    Forgive me as I'm fairly new to this.
    My data only has a single row and what I'm trying to do is extract specific fields in that record to feed into a command in my system execute.
    Going through your example, I'm not quite sure how I would reference multiple fields from the input. How would I convert the STDIN into parameters, as you mentioned?

    Also, when running your graph, the echo statement is not displayed in the console so I can't see that it's referencing the input value during the execution.

    Thanks again for your help.
    Chris
  • Avatar
    daitienshi
    0
    Comment actions Permalink
    Never mind.
    I just did some more research into command line scripting and figured it out.
    Thanks for all of your help!
    Chris
  • Avatar
    admin
    0
    Comment actions Permalink
    Just some notes for future generations :-)

    * code in sample can be used also for one row - the for/while cycle will be executed just once
    * in loop variable you can find whole line, delimited by character from metadata (e.g. "a|b|c")
    * you need to parse it to get fields

    also:
    * output of echo commands in not visible in console because it is collected on output port of SystemExec component

Please sign in to leave a comment.