Multiply by 100 in a component tMap

Seven Stars

Multiply by 100 in a component tMap

Hello
 

I have 2 lines and several columns. All are in double in the fileinputExcel.

List1   Column A        Column B          Column C

Number    145,25               254,12           54,94

%               0,331                0,154             0,504

 

I only want to multiply the line with % by 100. So, in the fileOutputExcel, i want see : 

List1   Column A        Column B          Column C

Number    145,25          254,12               54,94

%               33,1              15,4                 50,4

 

I tried to use the component tMap but it multiply all the columns (Number and %).

 

I don't how to do

 

Thanks in advance

Tags (1)
Forteen Stars

Re: Multiply by 100 in a component tMap

You could use IF condition, something like:

 

 

row1.List1.equals("%")?row1.ColumnA*100:ColumnA

(of course same for all columns)

 

-----------
Fifteen Stars TRF
Fifteen Stars

Re: Multiply by 100 in a component tMap

Seven Stars

Re: Multiply by 100 in a component tMap

Yes, i know. I had a little problem with posts.

Thank a lot.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

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

Downloads and Trials

Test drive Talend's enterprise products.

Downloads