Skip to Content
avatar image
Former Member

graphical mapping splitting

Hi ,

I have a mapping problem where i need to split the source field by comma into 2 seperate target fields.

For eg. Source = 123 main Street , 455 , app1

I need this to be split by comma to target1 = 455 and target2 = app1.

Please advice.

Thanks,

Teresa

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Dec 19, 2011 at 07:15 PM

    Hi Teresa

    You need to use an UDF. With two parameters one for input and the other for position.

    
     String valSplit[] = input.split(",");
     int position = Integer.parseInt(Pos);
     
     return valSplit[position].toString();
    
    

    source----


    >

    ...................................UDF----


    >Target

    constant(position)------>

    Regards.

    Luis Ortiz

    Add comment
    10|10000 characters needed characters exceeded