issue loading parent and child objects - tXMLMap, tESBConsumer.

One Star

issue loading parent and child objects - tXMLMap, tESBConsumer.

Hi,
i have an issue loading parent and child objects simultaneously using tXMLMap and tESBConsumer components in Talend.
The issue I was facing :
For one parent record, there might be multiple records in child table referred by a unique attribute. While running the job, all the records in parent table are getting updated correctly but in the case of child table, only one among the multiple records is getting updated.
Example ::   PR the parent object has 17 records 
                  PRLINE the child object has 27 records
PRNUM is the reference attribute for both the tables.
PRNUM is the primary key in PR table and is unique in the table.
The combination of PRNUM and PRLINENUM is unique in PRLINE table.

For each PRNUM in PR  table there can be multiple PRLINENUMs in PRLINE Table.
We expect 17 records should get inserted into target PR table and 27 in child PRLINE table.


Below are the screen shots of my job.
tMap settings :: loadonce, innerjoin,allmatches.
tXMLMap settings :: PR (group by) PRLINENUM (loop by),

 Can anyone help me in resolving this issue.
Let me know if any further information is required.




      
Regards
Roja

Community Manager

Re: issue loading parent and child objects - tXMLMap, tESBConsumer.

While running the job, all the records in parent table are getting updated correctly but in the case of child table, only one among the multiple records is getting updated.

is the web service perform this operation? From the screenshots, I see you do an inner job between parent table and child job, and then call a web service N times. Can you please show us the screenshots of provided job of webs service?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: issue loading parent and child objects - tXMLMap, tESBConsumer.

Hi Shong,
Thanks for the response.yes the entire job works on webservices. we have used tXMLMap component to provide the xsd of the corresponding WSDL which is used in tESBConsumer component. The screenshots for tXMLMap component were provided in the earlier conversation.
I am sharing the screen shots of tESBConsumer component.Is there any other information required?


Regards 

Roja
Community Manager

Re: issue loading parent and child objects - tXMLMap, tESBConsumer.

Hi 
If the web service is hosted by other provider rather than using Talend components to do it, i don't know how it works on the server side, but I think you can check the 'Log message' box in the advanced setting panel of tESBConsumer to see if the request payload is passed correctly to the webservice server?

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: issue loading parent and child objects - tXMLMap, tESBConsumer.

Hi 
I have seen the log messages of tESBConsumer, the request is going wrong.for example if you take the case of PR as parent object and PRLINE as child object,the first PRNUM is displaying correct details with its PRLINES,following from the second PRNUM ,the PRNUM isnt getting displayed but its following PRLINES are getting displayed which is erroring out.
Is there anything wrong am doing in group by and loop by elements of tXMLMapComponent.
tXMLMap settings::
PR:group by
PRLINE:loop by
I am sharing you the sample request XML.let me know if there is any possible solution.
<pr>
<prnum>xyz</prnum>
<prline>
<prlinenum>1</prlinenum>
</prline>
<prline>
<prlinenum>2</prlinenum>
</prline>
<prline>
<prlinenum>1</prlinenum>
</prline>
<prline>
<prlinenum>2</prlinenum>
</prline>
<pr>

Regards
Roja

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog