on 10-15-2007 6:17 AM
can any body send me few examples related to UDFs creation.
Hi Sudhakar,
First of all why we create UDFs: --> We create the UDF whenever our requirement is not fulfilled by the given FUNCTIONS, or we have a very less knowledge about those FUNCTIONS.
Just go through the below mentioned blog, in which you will find few good examples of functions.
/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13
Now Come to your ques <<i>can any body send me few examples related to UDFs creation</i>>.
As i mentioned above UDF creation is base on your requirement which is not fulfilled by given FUNCTIONS.
Example: if you have two fields, say A & B and the data is coming in both the fields as shown below
A -- 10 B --- 05
A -- 20 B --- 02
A -- 10 B --- 08
A -- 50 B --- 09
A -- 10 B --- 05
Now if you want to sum the values of B as per the common values coming in A, e.g.
A --- 10 B --- 18
A --- 20 B --- 02
A --- 50 B --- 09
So for the above mentioned example you can wirte an UDF to fulfill your requirement.
For writing and UDF you must have basic knowledge of JAVA.
For creating an UDF, press the user defined function, the declare your variables and then write your desired code.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating UDF
The Basic Idea of Java is sufficent to create an UDF in XI. Based on the requirement and code funcationality u need need know the jar files.
Creating UDF:
--> In the LHS of the graphical Editor u can find a Create New Function button
--> Click on it and give a name for u UDF
--> Also specify the parameters to the UDF. Note that the input & Output type to the parameter is always String type
or
--> Create an Java class using IDE and archive the file
--> Upload the archived file into XI in IMPORTEDARCHIEVES of Integeration Repository.
These uploaded functions can be used in the Mapping Editor
Also have a look at this blog
<a href="/people/wojciech.gasiorowski/blog/2006/11/01/the-power-of-regular-expressions-in-graphical-mapping-xi Power of Regular Expression in Graphical mapping</a> By Wojciech Gasiorowski
Regards
San
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.