Four Stars

tExtractXMLField and empty node in the xml file

Hello 

I'm working on a talend job that has been developed in the past and that is working correctlfy so i can't change all in this job. i have to add some fields from  an xml file and some node where i need to take thoses fields can be empty... 
exemple i can have on my xml file this :
<CarBookings/>
<MiscellaneousBookings/>

or they can be filled : 

<CarBookings>

....

<component_id>xxxxx</component_id>

</CarBookings>

 

to extract node of the files, the job is using tExtractXMLFields for each node needed ... 

So i add one for each of the node i need but as soon as 1 node is empty, i'm loosing all the previous data extracted from the previous tExtractXMLFields.

 

how i can do differently ? 

Many thanks for your help !

  • Data Integration
2 REPLIES
Employee

Re: tExtractXMLField and empty node in the xml file

Can you provide screenshots of your jobs and when it is losing all the other values?

Four Stars

Re: tExtractXMLField and empty node in the xml file

Hello

Thanks for your answer. 
Here a screenshot of this part of the job 

 

i have just add on this the tExtractXMLField who is not aligned with the others and i'm loosign all my datas because the tags activity_booking on this xml file is empty.

 

 The xPath on the new tExtractXMLField is : "ActivityBookings/ActivityBooking/"

and i add a column in the schema Component_id2 : "ComponentInfo/ComponentID"