Processing Xml messages and converting in struct format

Five Stars

Processing Xml messages and converting in struct format

Hi,

I have xml below i want to process the xml using Talend and i want output to be in below  expected struct format,so that i can create hive tables on this struct format.

 

 

 

<flighttic>
<pid>54846515522</pid>
<amount>2511</amount>
<person_details>
<person>
<fname>jakka</fname>
<lname>dilip</lname>
<flyinf0>
<fly>
<supplier>ETHIAD</supplier>
<date>2017/3/20 11:45 </date>
<mealcode>25</mealcode>
</fly>
<fly>
<supplier>American airlines</supplier>
<date>2017/3/21 22:45 </date>
<mealcode>19</mealcode>
</fly>
<fly>
<supplier>southwest</supplier>
<date>2017/3/23 14:45 </date>
</mealcode>
</fly>
<fly>
<supplier>southwest</supplier>
<date>2017/3/23 18:30</date>
<mealcode>25</mealcode>
</fly>
</flyinfo>
</person>
</person_details>
</flighttic>

 

 

expected output ::

pidamountfnamelanmesupplierdatemealcode
5.48E+102511jakkadilipETHIAD|American airlines|southwest|southwest2017/3/20 11:45|2017/3/21 22:45|2017/3/23 14:45|2017/3/23 18:3025|19||25
Nine Stars

Re: Processing Xml messages and converting in struct format

Hi,

 

Do you have a free Talend version ? Or a subscription version ? In case it is a subscription version, does your version include Data Mapper ?

 

Eric

Five Stars

Re: Processing Xml messages and converting in struct format

I am using Talend open studio for big data