One Star

User Defined Function in tMap

Hi,
I want to add some user "defined functions" in "Expression Builder" of "tMap" on the basis of them i want to some manipulation according to my requirement . but i didn't find any way to do this.
Under Expression Builder there is area named as "Categories" which contain "User Defined" field to do the same but there is now way to add our own custom function.
Please anybody tell me how to do it.
please reply ASAP..
Thanks in AdvanceSmiley Happy
6 REPLIES
One Star

Re: User Defined Function in tMap

Hi
Right click on "Routines" and create routine.
After you define a public static method, you can use it at Expression Builder.
Regards,
Pedro
One Star

Re: User Defined Function in tMap

What I found is that sometimes it is then enough to use this routine in tMap by CTRL + Space choosing the right routine. Somehow it doesn't work always. What helps then is to add "routines."
Example: fuzzyMatching.getLevenshteinDistance( string1,string2) ist what CTRL + Spaces enters. I need to extend it to : routines.fuzzyMatching.getLevenshteinDistance( string1,string2)
Looks to me like a bug as it is not always necessary.
Cheers
One Star

Re: User Defined Function in tMap

Hi
If you want to find user defined routines with "CTRL+Space", the user defined routine(the method) must be "public static".
Regards,
Pedro
One Star

Re: User Defined Function in tMap

Hi Ankit,
I had the same problem, I solved it by doing a Java comentary "/** */" imitating the one in the example. After doing it I've been able to see it in the "User Defined" tab on tMap expresions.
Hope this helps,
Khor
One Star

Re: User Defined Function in tMap

Exactly...even i face the same problem...if i provided it with fully qualified name only then it is recognizing the classs.....


What I found is that sometimes it is then enough to use this routine in tMap by CTRL + Space choosing the right routine. Somehow it doesn't work always. What helps then is to add "routines."
Example: fuzzyMatching.getLevenshteinDistance( string1,string2) ist what CTRL + Spaces enters. I need to extend it to : routines.fuzzyMatching.getLevenshteinDistance( string1,string2)
Looks to me like a bug as it is not always necessary.
Cheers
One Star

Re: User Defined Function in tMap

Hi,
I want to use oracle function and complex query to fetch data from oracle database using talend, can anyone help on this.
For example.
i created metadata for table A in oracle and i want to fetch data using complex query and that complex query i want to use in some other jobs as well, so can i make common function so that i can use it in different jobs.
Thanks in advance.

.
..
...