Replace from value of other column

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.
Highlighted
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!
Highlighted
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 Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now

How to Modernize Your Cloud Platform for Big Data Analytics With Talend and Micr...

Learn how<SPAN>to modernize your Cloud Platform for Big Data Analytics with Talend and Microsoft Azure</SPAN>

Read