on 07-24-2016 12:51 AM
I need to create a UDF that outputs 3 fields to the target structure using "all values in queue" but there are another 3 fields that can map directly to a single field in the target structure. When I tried to do this, the data through the UDF was misaligned with the data that was directly mapped. I solved this by passing the direct map fields into the UDF also but this becomes a problem in my next mapping as the number of fields starts to grow.
The image shows what I really need to do, at this works. But when I take the direct mapped values out and map them independently, the data is out of sync. Thanks for the help.
Without knowing the UDF code, it is not possible to help you. However, I see a Hashtable declaration in the UDF. I think it is not possible to do a mapping of the mentioned fields directly without UDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The UDF uses all values in queue. loops through the input values, looks up 3 related values and outputs them with a context change between each set. I had to add the direct mapped fields to this loop and output them inside of each context change. If I mapped them directly outside the UDF the context did not match, sync with the data in the udf. There is no real complexity to this. I'm unable to access this code at the moment, the vpn to the system is down. But, the image pretty well captures the situation PLUS the udf uses all values in queue. Perhaps I should go back and try this again if, in "Theory" this should work.
what issue are you facing ...Just drag the sender and targets in mapping editor area nd do the mapping .I dont think there should have any issue.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I first tried this with the direct map fields mapped outside the UDF, the data did not match the data going through the UDF. I assumed the context was lost on the direct mapped fields was the problem since the UDF used "all values in queue".
Hi Carlton!
Wouldn't you please provide an example of source data and desired output?
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carlton!
It would be nice to take a look at example of source XML filled up with some data and result XML with that data transformed and arranged according to your mapping logic.
Now we can see only several elements given with no reference to its contexts in message structure and just a part of UDF code.
Regards, Evgeniy.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.