cancel
Showing results for 
Search instead for 
Did you mean: 

How to map multiple source fields to single target field

badugu_sarika
Participant
0 Kudos

Hi ,

I have to map multiple source fields to a singlr target field. How can I achieve this ? Should i use UDF ? If so what code should be in UDF.

Below is my mapping . I just tried but I dont understand what is to be written in UDF Title which i have created.

Here I have to check source field with a string and if that equals then i need to map to target field.

Please help me how to acheive this.

Thanks

SARIKA

Accepted Solutions (1)

Accepted Solutions (1)

former_member216332
Participant
0 Kudos

Hello Sarika,,

If I understand your question right, I believe you just answered your own question.

You can try the BOOLEAN -> IF/IFs in the graphical mapping & achieve the required combination at your target.

May be something like the below mapping. Its completely up to your requirement.

Good luck.

Sam

Answers (3)

Answers (3)

former_member398373
Participant
0 Kudos

Hi Sarika,

udf

Regards,

Papireddy.

iaki_vila
Active Contributor
0 Kudos

Hi Sarika,

If you do a double click into Title UDF you can check the java code and as Raghuraman said, if you have any problem to understand it, share the code with us.

Regards.

former_member186851
Active Contributor
0 Kudos

Hello Sarika,

If your concatenation your source strings no need of UDF,concat funciton will do.

To understand what is written in the code,Post it so that we can analyse the same.

badugu_sarika
Participant
0 Kudos

I can't concate the source fields.The requirement is not like that.

I just mapped like  that to give a screenshot here . I didt write any code in UDF.

former_member186851
Active Contributor
0 Kudos

Hello Sarika,

Just share the code ,Let it be written by anyone.

And let us know what logic your using to combine the strings.

badugu_sarika
Participant
0 Kudos

Hi Raghu,

I just created a UDF with 5 inputs. I did not write any code inside. I was just trying creating UDF.

And i dont want all those fields to be concatenated and sent to target field.

former_member186851
Active Contributor
0 Kudos

Thats fine Sarika.

Please tell what wish to acheive? you want to include any specific rule?

badugu_sarika
Participant
0 Kudos

I have to Map few sourcce fields to one Target field.

In the above mapping I have shown you if ZWHI equals some value ZTOR7 then it should be mapped to Target field TDTEXTTYPE .

And similarly if ZCBT, Zcustom equals some value then they also need to be mapped to TDTEXTTYPE at target.

This I want to achieve.

former_member186851
Active Contributor
0 Kudos

Hello Sarika,

This can be done using normal mapping functions,Try as per Sam;s comment,

If its not working let us know,will help you out.