Replace from value of other column

Highlighted
Five Stars

Replace from value of other column

 

I'm starting using the Talend big data.

I wanna replace the nulls of one column by the value of the other?

It's this possible?

tReplace.PNG

Regards,

Vitor Sousa


Accepted Solutions
Forteen Stars

Re: Replace from value of other column

you can do in tMap by writing below way.

 

row1.lname==null? row1.fname : row1.lname

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Fifteen Stars TRF
Fifteen Stars

Re: Replace from value of other column

Hi,

Suppose the flow before your tReplace is called row74 (like in the following capture), you can refer to the desired column your want to get to replace "NULL" or null values in the source column.

Here, the target column is called newColumn1 and the source is newColumn.

This make the job:

Capture.PNG

In my example the input data are the following:

Capture.PNG

And the result is:


Capture.PNGHope this helps.


TRF

All Replies
Forteen Stars

Re: Replace from value of other column

you can do in tMap by writing below way.

 

row1.lname==null? row1.fname : row1.lname

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: Replace from value of other column

Thanks!
Fifteen Stars TRF
Fifteen Stars

Re: Replace from value of other column

Hi,

Suppose the flow before your tReplace is called row74 (like in the following capture), you can refer to the desired column your want to get to replace "NULL" or null values in the source column.

Here, the target column is called newColumn1 and the source is newColumn.

This make the job:

Capture.PNG

In my example the input data are the following:

Capture.PNG

And the result is:


Capture.PNGHope this helps.


TRF
Five Stars

Re: Replace from value of other column

I will try. But thanks for the help.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch