Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm kind of struggling because of the the rest endpoint of one of our provider.
It requires multiple loops per item/entity I have to send to them (I've made this with tXMLMap in order to fill each document) :
I had to make something that looks like a hack to me with the tJavaFlow, to force each result to generate only one document at a time (with the all in one set to "true" in order to get all the loop in one document for each entity)
I don't know if i'm doing it the right way, but that's the only way I found to make it ALMOST work...
The issue i'm still facing, is that the multiples lookups multiply each other results numbers.
Here's a result test :
It should looks like :
[...] cdc_offer_photos: [
[Object], [Object]
]
},
cdc_service: [
158, 159, 162, 163, 166
],
cdc_region: [
'28-normandie'
],
cdc_department: [
'27-eure'
]
}
Once again, I'm not sure that I'm doing it the right way, and I can't believe that there's not a more elegant/simple way to achieve what I want..
I'm spending so much time on this, I'm really close to drop Talend and rebuild all of this way more easily with a nodejs script....
So I'll take with a great pleasure all your advices, thanks in advance !
Thanks for your reply.
I actually already tried with multiple XMLMap, but ended with the same problem or even worse :c
I will eventually try with multiple tAdvancedFileOutputXML but I'm very reticent to make again and again the same scheme click after click, it takes forever.
And I'm trying right now to use DataMapper (that I had never heard of before) according to one suggestion in the thread you linked.
Seems promising, but I can't find how to make the "lookup" in it. I guess I should use "filter" in the loop tab.
Example : "cdc_offer_photo" should loop over it's code filtered by the "fiche" 's code :
But, how do I link the two fields inside ?
I (a bit randomly) tried this, and wanted to test it :
But now I can't find how to get the output of the hMap :
"The scheme has no column defined"
Thanks
Hello @Henri-Yan
Not able to remove the duplicated records on tXMLMap, you can try to use multiple tAdancedFileOutputXML components with 'Append the source xml file' option to generate the xml file, then read the xml file back as a Document and send it to tRestClient. See this related topic.
https://community.qlik.com/t5/Design-and-Development/tXMLMap-and-multiple-loops/td-p/2449871
Regards
Shicong
Thanks for your reply.
I actually already tried with multiple XMLMap, but ended with the same problem or even worse :c
I will eventually try with multiple tAdvancedFileOutputXML but I'm very reticent to make again and again the same scheme click after click, it takes forever.
And I'm trying right now to use DataMapper (that I had never heard of before) according to one suggestion in the thread you linked.
Seems promising, but I can't find how to make the "lookup" in it. I guess I should use "filter" in the loop tab.
Example : "cdc_offer_photo" should loop over it's code filtered by the "fiche" 's code :
But, how do I link the two fields inside ?
I (a bit randomly) tried this, and wanted to test it :
But now I can't find how to get the output of the hMap :
"The scheme has no column defined"
Thanks
Nevermind, I finally made it works.
The problem was that the output of the hmap needs to be a string, not a document (as I tried do inject it in a RESTClient component)
Thanks