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
Highlighted
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
Highlighted
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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

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