<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calculating values using Linear Interpolation with two input files using Tmap and tJavaRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317010#M87509</link>
    <description>&lt;P&gt;After using a Tmap with the CSV file, I have two columns :&amp;nbsp;&lt;/P&gt;&lt;P&gt;A (pourcentage)&amp;nbsp;&lt;/P&gt;&lt;P&gt;B (duration)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After using a Tmap with the CSV file, I have&amp;nbsp;many columns but the one I need to work with is :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C (duration)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And the one I need to fill is :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;D (pourcentage)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For each value in my C column : x , I need to do an linear interpolation to find y (its pourcentage),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;which means find x1 in B as x &amp;gt; x1 and the next value x2, and&amp;nbsp;their y1 et y2 from column A .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once I have x1, x2, y1, y2, I can apply this :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;y = (y2 - y1) * (x-x1) / (x2 - x1) + y1&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Mar 2018 09:18:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-19T09:18:13Z</dc:date>
    <item>
      <title>Calculating values using Linear Interpolation with two input files using Tmap and tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317008#M87507</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have &lt;STRONG&gt;two input files&lt;/STRONG&gt;, one of them is csv and the other&amp;nbsp;one is Excel, they have different schemas.&lt;/P&gt;&lt;P&gt;I tried to use a &lt;STRONG&gt;Tmap&lt;/STRONG&gt; to filter and get the columns that I need from both files and put them into &lt;STRONG&gt;two different outputs&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;And now I need to do a linear&lt;SPAN&gt;&amp;nbsp;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..).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know if I could do this in the Tmap, or I should use another component.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found the component &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; 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 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 10:10:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317008#M87507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-15T10:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating values using Linear Interpolation with two input files using Tmap and tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317009#M87508</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could you please elaborate your case with an example with input and expected output values?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sabrina&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 03:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317009#M87508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-19T03:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating values using Linear Interpolation with two input files using Tmap and tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317010#M87509</link>
      <description>&lt;P&gt;After using a Tmap with the CSV file, I have two columns :&amp;nbsp;&lt;/P&gt;&lt;P&gt;A (pourcentage)&amp;nbsp;&lt;/P&gt;&lt;P&gt;B (duration)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After using a Tmap with the CSV file, I have&amp;nbsp;many columns but the one I need to work with is :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C (duration)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And the one I need to fill is :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;D (pourcentage)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For each value in my C column : x , I need to do an linear interpolation to find y (its pourcentage),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;which means find x1 in B as x &amp;gt; x1 and the next value x2, and&amp;nbsp;their y1 et y2 from column A .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once I have x1, x2, y1, y2, I can apply this :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;y = (y2 - y1) * (x-x1) / (x2 - x1) + y1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 09:18:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculating-values-using-Linear-Interpolation-with-two-input/m-p/2317010#M87509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-19T09:18:13Z</dc:date>
    </item>
  </channel>
</rss>

