on 03-10-2006 1:58 AM
I need convert some data from one metric system to another when mapping, how to implement it in XI easily? do I need to implement java code or just design at integration repository?
Message was edited by: Spring Tang
Best Bid-Value Mapping instead of CSV files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Spring,
If it is a simple metric conversion like cm to m or miles to km , or currency conversion, I think the best solution would be to write an User Defined function in your mapping and use it whereever you want.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1.I found that in each message mapping, I need redefine this function. how to let my user function global. 2. I will put some conversion rule in one csv file, and the user function will read this file to convert, but how to make that csv file configurable, for example, the location of file?, I don't want to hardcode this in user function.
Spring,
I guess you have to define it in all the message mappings and you have no alternative. In fact if you get to know any work-around / solution for this please let know. We had similar situation and what we did was use the same jar file as an imported archive in namespace. This jar file contains your actual business logic in a class and we defined another UDF which simply calls this class, advatage of this being if your business logic is 100 lines of code you dont need to put in each mapping.every mapping would use a UDF with max 1-2 lines of code.
Hope this helps.
~Amol
Hi Spring,
May be you can try this method.
1. write the conversion routines as functions in a JAVA class.
2. convert it as a JAR.
3. import it in Integration Repository.
4. now in "user defined function", you can use the methods, present in the imported JAR.
this time also u need to create user defined function for each mapping, but that "user defined function" will have only one statement, the function call from that imported JAVA class.
hope this helps. if any clarification revert back.
regards,
P.Venkat
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.