I am using XML input stage for parsing XML files in a parallel job, would like to know how I can pass through XML parsing when repetitive element is not found when parsing.
Code: Select all
<Store>
<ID>
<code>
<Item extension="11"/>
</code>
</ID>
<ID>
<code>
<Item extension="21"/>
</code>
</ID>
<Container>
<Stock code="abc"/>
<Container>
<Stock code="bcd"/>
</Store>
I am using below design in parsing. In XML stage 2, when Container info is missing in the message (as it is optional), no records are coming out of XML stage 2. I am using 'repetitive element required' unchecked in Transformation Settings and using Container ID as key.
[External Source] -> [ XML Stage 1 Parsing ID info ] - > [ XML Stage 2 Parsing Container info] -> Peek
Other option, I may have to parse out both elements separately and use a join stage to achieve this. But we are trying to minimize the number of the joins in the job. Would like to know if there is a way to make my first option work.
Thanks,
Vik.