Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: UDF Help required

$
0
0

take input one field as "field" and one output as "result" udf type is all values of a context.

 

int len = field[0].length();

 

String str = field[0];

 

int number = (int)Math.ceil(len/5);

 

for(int i=0; i<number; i++)

{

 

if(i!=number-1)

     result.addValue(str.substring(i*5,(i+1)5));

else

     result.addValue(str.substring(i*5,str.length());

 

}

 

 

ex

ABCDE

FGHIJ

KLMNO

P               15-16

 

 

len 16

num = 4

ABCDEFGHIJKLMNOP

 

 

map the udf to target node featureID


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>