snaplogic - from single record to multiple rows in csv

723 views Asked by At

How I can build a pipeline that gets a input as below and then needs to split this into 2 records in CSV file as in the image?

<HOU>
  <IDOC BEGIN="1">
    <HOU SEGMENT="1">
      <ACTIVE>Yes</ACTIVE>
      <NAME>Scraper Equipment</NAME>
      <TYPE>Rental</TYPE>
      <REF>22-367817</REF>
      <SER_NUM>348-2326</SER_NUM>
    </HOU>
  </IDOC>
</HOU>

1

There are 1 answers

0
Bilesh Ganguly On

You can have each individual row mapping sandwiched between a Copy snap and a Union snap.

Following is a sample pipeline.

enter image description here

Parsed sample XML:

enter image description here

Mapping corresponding to row #1.

enter image description here

Mapping corresponding to row #2.

enter image description here

Result of the union.

enter image description here