Solved! Go to Solution.
Hi there. Simple question, I have a REST endpoint where I want part of the URL to be the unit id, and then pick that up to use as part of the "Loop XPATH query" in a tExtractXMLField component. Can anyone advise?
If I understand your request well, you need a tFlowToterate component to iterate item ID, so that it could be accessed on any other components. For example:
on tMysqlInput, read item ids from mysql table.
on tFixedFlowInput, generate the current item id and pass it to tRestClient as input parameter. Define one column called item_id in the schema and then, in the single table, set the value of item_id column as (Integer)globalMap.get("item_id")
on tExtractXMLField, set the loop xpath query as ""/bills/bill/"+(Integer)globaoMap.get("item_id")
It might not completely address your request, I hope it give you some hints.
Well, it gave me inspiration. I used a tJavaRow after the tRESTRequest to pop the requested ID into globalMap (although it concerns me as to whether that would be global to a second request run at exactly the same time). Then, after retrieving the XML from the data-owning system and structuring it, I added a tRowFilter to only pull out the id in question.