Skip to Content
avatar image
Former Member

SFTP - File Content Conversion in HCI

Hi,

In HCI, we have standard transformers like XML -> JSON, etc.

My structure after mapping is like this:

Recordset (1...1)

----Header (0...unbounded)

------Line (1...1)

I need to output a flatfile that writes each line in a line in a flatfile.

For example, my data is

<Recordset>

<Header>

<Line> abcdef </Line>

</Header>

<Header>

<Line> fghjkl </Line>

</Header>

</Recordset>

My output file will be:

abcdef

fghjkl

Is this possible using standard HCI functions, or do I have to write a script for this?

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 13, 2017 at 07:53 AM

    Hello Raye,

    You can use standard XML to CSV converter to achieve the same.

    Input Data:

    <Recordset>
    	<Header>
    		<Line>abcdef</Line>
    	</Header>
    	<Header>
    		<Line>fghjkl</Line>
    	</Header>
    </Recordset>
    

    Convertor Configuration:

    Output Data:

    abcdef
    fghjkl
    

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sriprasad Shivaram Bhat

      Hi Sriprasad,

      Thank you for your answer regarding this.

      However, will this work if I want to choose two different child nodes with different names?

      <Recordset><Header1><Line>abcdef</Line></Header1><Header2><Line>fghjkl</Line></Header2></Recordset>

      For this, I want to select Recordset/Header1 and Recordset/Header2.

      Also, is it possible for this case too:

      <Recordset><Field1> Test </Field1><Header1><Line>abcdef</Line></Header1><Header2><Line>fghjkl</Line></Header2><Field2> Test </Field2></Recordset>

      I also want to retrieve Field1, Header1/Line, Header2/Line and Field2?

      Thanks.