I have two input files, one of them is csv and the other one is Excel, they have different schemas.
I tried to use a Tmap to filter and get the columns that I need from both files and put them into two different outputs.
And now I need to do a linear interpolation based on two columns from the first file (csv) and one column from the second file (Excel), I already have the algorithm which requires using a loop and conditions (if, else..).
I don't know if I could do this in the Tmap, or I should use another component.
I found the component tJavaRow but I don't know how to use it because my Tmap has two outputs, would tJavaRow be able to read both of them in order for me to do the linear interpolation ? Is there another solution ?
Could you please elaborate your case with an example with input and expected output values?
After using a Tmap with the CSV file, I have two columns :
After using a Tmap with the CSV file, I have many columns but the one I need to work with is :
And the one I need to fill is :
For each value in my C column : x , I need to do an linear interpolation to find y (its pourcentage), which means find x1 in B as x > x1 and the next value x2, and their y1 et y2 from column A .
Once I have x1, x2, y1, y2, I can apply this :
y = (y2 - y1) * (x-x1) / (x2 - x1) + y1