Hi,
When we read xml element, it is not bringing all information. We are trying to migrate from 3.5 to 4.4 and having this issue.
For ex, personal data of a person. Person ‘abc’ has 3 different education details such as ‘High School’, ‘Bachelor’ and ‘Masters’. We receive data like this:
<Person_Education>
<education_id>High School</education_id>
<education_place>Loc1</education_place>
</Person_Education>
<Person_Education>
<education_id>Bachelor</education_id>
<education_place>Loc2</education_place>
</Person_Education>
<Person_Education>
<education_id>Master</education_id>
<education_place>Loc3</education_place>
</Person_Education>
In 3.5, we used to get the highest (last one). Same xsd in 4.4 picks the first one (ie. High school).
Can you please help us?
Thanks
Sriram
6304897817
Hello Sriram,
From the snippet of the XML input file and from your description of the situation I understand that you mapped the output of the <Person_Education> element to populate the parent record (the “ABC” person). Since the <Person_Education> element has multiple instances within the parent element (in other words the occurrence of the element is [0:n]) this approach would indeed cause the reading of a single record only. However, this does not represent a proper way of mapping elements with multiple occurrences and the fact that only the last record (e.g. “Master”) is output is merely a coincidence in the 3.5 version. In other words, such behavior was never designed intentionally. Then, introducing of the new functionality of XMLExtract (outputting multiple field instances into a list) in the later versions of CloverETL Designer forced us to change the logic of reading the XML files fundamentally. An unintended side effect of this change is what you are seeing in your example in version 4.4 (only the first record “High School” is output).
Bearing that in mind, such behavior of the system is not driven by any user-end settings as it is an unintentional result of a different function. I suggest redesigning of the mapping so that you take the number of element occurrences into account by outputting them to a separate port.
Best regards,