on 03-11-2011 2:32 PM
Hi All,
I have requirement like i have to sort the file contents before message mapping in Xi. is there any option please suggest me with your value information.i dont want to sort in message mapping before that i want file contents to be sorted order.waiting for your quick reply.
Thanks,
seshagiri
Hi,
You can have two mapping programs. Sort in first mapping and then pass out put of this to second mapping program. It will be easy to implement also.
Or you can go for XSLT/JAVA mapping for sorting.
-Gouri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can use two mapping one mapping to sort and second mapping for actual mapping
the target structure of first mapping and the source structure of second mapping should be same by this the data will be passed to second mapping automatically
and you need to call these both mapping in one operation mapping
under one operation mapping two message mappings need to be called
So first mapping Sorting mapping
Second mapping actual mapping
Hi,
You can do this in one scenario.
Lets say you have MT_Source and MT_Target as two message types.
Now your MM1 will be between MT_Source & MT_Source, that is same message type. Here you built your sorting logic.
Now create MM2, between MT_Source & MT_Target. Here your actual mapping logic will be implemented. The input payload for MM2 will be sorted data.
Now in operation mapping, first call MM1 and then call MM2 (You have a plus + sign to add multiple mapping programs). Due to this sequence, at run time first MM1 will be executed and after that its oupt will be given to MM2 as source payload.
Hope its clear. Plz let me know if you have any doubts.
-Gouri
Hi Gouri,
I have 5 fields in flatfile i have to use 3 fileds for sorting records.i mentioned tht we required two mappings.first maping is graphical mapping or java mapping?can i achive this using graphical mapping.if i have to go for the java mapping can u provide the some mapping blogs or any sample code for java mapping.
Thanks,
Seshagiri
Hi Sesha,
I guess you requirement is as follows:
Flat Files (5)---> convert to XML (content conversion) -> mapping condition (use 3 elements to define sorting of records at receiver)-receiver structure.
If this is the case its a normal grapical mapping u dont require java or xslt...
You can use normal node functions to achive this requirement...
Yes, as suggested you can go for an adapter module development to handle this.
But we are really keen to know why is it like you have to sort the input before the mapping. What is the business requirement (shall we say restriction ?)? Please share...may be we can provide you with better solution/ design.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i dont want to sort in message mapping before that i want file contents to be sorted order
And why is that? Whats the business case of this requirement?
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
u can develop adapter module and first sort the content and then pass it to message mapping.
but why u wanted to sort it before and not in message mapping is there any specific reason for that.
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seshagairi,
You can use the sort function or SortByKey fn in your mapping
Thx,
Amar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.