<?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: Set date on condition in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209489#M8293</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLI7AAO"&gt;@priyadarshiniv&lt;/A&gt;&amp;nbsp;,can you share sample data and required output?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2019 13:46:57 GMT</pubDate>
    <dc:creator>manodwhb</dc:creator>
    <dc:date>2019-10-18T13:46:57Z</dc:date>
    <item>
      <title>Set date on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209488#M8292</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have an excel input step where I am reading multiple excel files and loading it in a SQL table (tFileList --&amp;gt; tFileInputExcel). The structure of all files is same but data is different (Region1.xlsx, Region2.xlsx and so on). Now while loading I will have to assign a start date to projects with a condition. The condition is if the project is not present in the table then assign loading timestamp as start date else do not change the existing row. How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;PV&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 13:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209488#M8292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-18T13:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set date on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209489#M8293</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLI7AAO"&gt;@priyadarshiniv&lt;/A&gt;&amp;nbsp;,can you share sample data and required output?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 13:46:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209489#M8293</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-10-18T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set date on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209490#M8294</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Say for example:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Initial load gets 2 projects.&amp;nbsp;Lets say loading happens on 18.10.2019&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project number&lt;/TD&gt; 
   &lt;TD&gt;Period&lt;/TD&gt; 
   &lt;TD&gt;Turnover&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project1&lt;/TD&gt; 
   &lt;TD&gt;10.2019&lt;/TD&gt; 
   &lt;TD&gt;100000&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project2&lt;/TD&gt; 
   &lt;TD&gt;10.2019&lt;/TD&gt; 
   &lt;TD&gt;200000&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;So the table looks like:&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project number&lt;/TD&gt; 
   &lt;TD&gt;Period&lt;/TD&gt; 
   &lt;TD&gt;Turnover&lt;/TD&gt; 
   &lt;TD&gt;Start date&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project1&lt;/TD&gt; 
   &lt;TD&gt;10.2019&lt;/TD&gt; 
   &lt;TD&gt;100000&lt;/TD&gt; 
   &lt;TD&gt;18.10.2019&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project2&lt;/TD&gt; 
   &lt;TD&gt;10.2019&lt;/TD&gt; 
   &lt;TD&gt;200000&lt;/TD&gt; 
   &lt;TD&gt;&lt;P&gt;18.10.2019&lt;/P&gt;&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now in period 11.2019, a new projects gets added along with the old ones. Lets say loading happens on 18.11.2019&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project number&lt;/TD&gt; 
   &lt;TD&gt;Period&lt;/TD&gt; 
   &lt;TD&gt;Turnover&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project1&lt;/TD&gt; 
   &lt;TD&gt;11.2019&lt;/TD&gt; 
   &lt;TD&gt;500000&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project2&lt;/TD&gt; 
   &lt;TD&gt;11.2019&lt;/TD&gt; 
   &lt;TD&gt;600000&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project 3&lt;/TD&gt; 
   &lt;TD&gt;11.2019&lt;/TD&gt; 
   &lt;TD&gt;700000&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;Then the table should have following values:&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project number&lt;/TD&gt; 
   &lt;TD&gt;Period&lt;/TD&gt; 
   &lt;TD&gt;Turnover&lt;/TD&gt; 
   &lt;TD&gt;Start date&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project1&lt;/TD&gt; 
   &lt;TD&gt;10.2019&lt;/TD&gt; 
   &lt;TD&gt;100000&lt;/TD&gt; 
   &lt;TD&gt;18.10.2019&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project2&lt;/TD&gt; 
   &lt;TD&gt;10.2019&lt;/TD&gt; 
   &lt;TD&gt;200000&lt;/TD&gt; 
   &lt;TD&gt;18.10.2019&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project1&lt;/TD&gt; 
   &lt;TD&gt;11.2019&lt;/TD&gt; 
   &lt;TD&gt;500000&lt;/TD&gt; 
   &lt;TD&gt;18.10.2019&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project2&lt;/TD&gt; 
   &lt;TD&gt;11.2019&lt;/TD&gt; 
   &lt;TD&gt;600000&lt;/TD&gt; 
   &lt;TD&gt;18.10.2019&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Project 3&lt;/TD&gt; 
   &lt;TD&gt;11.2019&lt;/TD&gt; 
   &lt;TD&gt;700000&lt;/TD&gt; 
   &lt;TD&gt;18.11.2019&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope this explains the required condition.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Priya&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 14:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209490#M8294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-18T14:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set date on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209491#M8295</link>
      <description>&lt;P&gt;Hi Priya,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; The first step will be to identify the unique records based on project number. This can be achieved by reading from the table with group by clause.&lt;/P&gt; 
&lt;PRE&gt;SELECT&amp;nbsp;&amp;nbsp;project_name, start_date
from project_table
group by&amp;nbsp;project_name, start_date&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;You can store this data to either Hash components or temporary files.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In process next month data, you read the input data from file and do a left outer join with above lookup data based on project_name.&lt;/P&gt; 
&lt;P&gt;If the project name lookup is null, use the input start date (or populate current date) else use the date from lookup.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7Px.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131293i13999D351430E07C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7Px.png" alt="0683p000009M7Px.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 21:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Set-date-on-condition/m-p/2209491#M8295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-18T21:38:29Z</dc:date>
    </item>
  </channel>
</rss>

