Unable to retrieve data in desired format(I am getting duplicate elements) from multiple tables for my web service

Highlighted
Four Stars

Unable to retrieve data in desired format(I am getting duplicate elements) from multiple tables for my web service

I am new in Talend and I can't find solution for this problem.

I have 3 tables(CCH_SERVICE,CCH_SERVICE_INSTANCE and CCH_SERVICE_CONFIGURATION). I have load schema from repository for request and response. Idea of the job is that user type in NAME of the service(request schema) and get response from multiple tables. You can see my mappings in picture2. So, when user type in NAME of service, from table CCH_SERVICE has to get ID,NAME and CREATE_TS..Then, attribute ID of table CCH_SERVICE(row 2 in the picture) I mapped into an attribute CCH_SERVICE_ID of table CCH_SERVICE_INSTANCE(row 3 in the picture) because it is foreign key and I want to get ID,NAME,CCH_SERVICE_ID and CREATE_TS from table CCH_SERVICE_INSTANCE and so on..
So basically,for my request(NAME of the service) I want to get all data for that service from all tables,but without duplicate elements when I do join..One service can have more service instances, and one service instance can have more service configurations..When I run this in soapUI I am getting some elements TWICE(picture3) because join works like that..I don't know how to get this in another format.I want for ONE service that I have, all informations from another tables for that service but only one appereance of service in request(not duplicate like in the picture)!.Images are here.


picture1.pngpicture1picture2.pngpicture2picture3.pngpicture3

Moderator

Re: Unable to retrieve data in desired format(I am getting duplicate elements) from multiple tables for my web service

Hello,

Have you tried to remove the duplicates and leave only unique pairs of code and value?

You can use tExtractXmlField with tUniqRow component in talend.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads