cancel
Showing results for 
Search instead for 
Did you mean: 

Field Segregartion

Former Member
0 Kudos

Hi ,

I have a field of type string in my Source strucutre of type String which consists multiple values seperated by SPACE,

Now in mapping i have to segregate these values into individual fields could u tellme how is it possible,

Sample data:

========

Field: 200006 2000000018 2100000026548

these have to be mapped to a field "targetField" (0-unbounded) in target.

so my target would be

targetfield1 = 200006

targetfield2 = 2000000018

targetfield3 = 2100000026548

any inputs.....!!! any UDF i can use....? i am not good at java..though....!!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can easily do this with a advanced UDF.

Follow this code:

give 'input' as the input parameter name.


String[] values = input[0].split(" ");
for(int k=0; k < values.length; k++)
{
     result.addValue(values[k]);
}

Regards,

P.Venkat

Message was edited by:

Venkataramanan Parameswaran

Answers (0)