XML reader questions

1. I have a DB structure where ID is a separate field and the field with XML details does not contain that ID in its content.
How can I make sure that the ID is not missed while processing XML? This can happen because the ID should be split to another data flow and then merged back with difficulties such as sequence key etc…
2. Is there a way for implicit mapping if the XML structure is value itself
Now I use several mappings with xpath expressions like [@name=‘fieldname’], but do not feel like it :slight_smile:

Hello, Golomeen,

ad 1) If the content of your xml file is always exactly one record, you can use Combine component. This component joins two data streams together by order. So if some record contains id and xml and these two values are splitted into two data streams, the values can be joined together as long as the both field preserved their order among the other records. http://doc.cloveretl.com/documentation/ … mbine.html
If your xml contains more than one record, the only way that comes to my mind is jobflow. You need CloverETL Server for that but you can orchestrate the flow just in the way you need in this situation. The result would be the same id for each record of the xml paired with the id.

ad 2) Such thing is not possible, I am afraid. XML is a format suitable especially for non-homogenous data and therefore we can not be sure that format presented by you would be generally preserved. This is the reason why it does not make sense to add such implicit mapping. XPath expressions are the proper way here.

I hope you will find my answers useful. If you have any further questions, just let me know.

Best regards,