cancel
Showing results for 
Search instead for 
Did you mean: 

my scenario is proxy to file(fcc) ,i need one udf

Former Member
0 Kudos

Hi All,

in my scenario i need one requirement in mapping, for name field maximum length is 15 at target side.

if NAME field  length is greater than  15 then we pass only 15 characters else below 15 characters.

please send me UDF code as per my requirement.

Thanks,

Bhaskar

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

use standard fucntions like below it works.

Former Member
0 Kudos

Hi Rajashekar,

thanks for your reply, i have already done like that but my client want udf  for this requirement.

please send me udf code as per my requirement.

Thanks,

Bhaskar Reddy

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Very simple.

Create a method and pass string as argument. 

public String stringReturn(String var1, Container container) throws StreamTransformationException{

 

String returnString;

if(var1.length()<=15){

  returnString = str;

} else{

returnString = str.substring(0,15);

}

return returnString;

}

Former Member
0 Kudos

Hi bhaskara maram

it seems you have not searched or given enough effort before posting and you need ready to use code... it is not good ....

@Raja  & Baskar :  what are your views ,I believe we should not do spoon feeding ....