<?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: How to add Insert date or Update date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343161#M110953</link>
    <description>&lt;P&gt;The easiest way I can think to do this is to simply have 2 DB components; one for an update and one for an insert. Set up your tMap to use a lookup from the DB table you are writing to and use that to identify if this is a lookup or an insert. Create two outputs from your tMap (one to the insert and the other to the update), then apply the date logic logic there. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will not reduce the performance noticeably (it may actually improve it slightly) and it gives you far more control when wanting to achieve slightly different outcomes based on whether it is an insert or update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 11:16:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-19T11:16:42Z</dc:date>
    <item>
      <title>How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343160#M110952</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Talend Open Studio V8.0.1, to map data from excel file to an Oracle SQL database.&lt;/P&gt;&lt;P&gt;the table action is : "Update or Insert". as I expect more update than new item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I would like to fill out 2 field in the database:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;LOADDATE&lt;/LI&gt;&lt;LI&gt;UPDATEDATE&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The first one dedicated to the initial load date&lt;/P&gt;&lt;P&gt;the second, updated after each "update" of the item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see how to proceed to perform this task, could you please help me? is it on the Database item or on the Tmap item ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Keihilin&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:11:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343160#M110952</guid>
      <dc:creator>Keihilin</dc:creator>
      <dc:date>2024-11-15T22:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343161#M110953</link>
      <description>&lt;P&gt;The easiest way I can think to do this is to simply have 2 DB components; one for an update and one for an insert. Set up your tMap to use a lookup from the DB table you are writing to and use that to identify if this is a lookup or an insert. Create two outputs from your tMap (one to the insert and the other to the update), then apply the date logic logic there. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will not reduce the performance noticeably (it may actually improve it slightly) and it gives you far more control when wanting to achieve slightly different outcomes based on whether it is an insert or update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 11:16:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343161#M110953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-19T11:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343162#M110954</link>
      <description>&lt;P&gt;Thank you for the quick feedback, I will try.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 12:22:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343162#M110954</guid>
      <dc:creator>Keihilin</dc:creator>
      <dc:date>2023-01-19T12:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343163#M110955</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I added a component of the database (input version) to do get the list of existing items.&lt;/P&gt;&lt;P&gt;Now I'm in the Tmap component, with the new row block on the left, I would like to create 2 variable in the middle column:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if row1.itemName in row4.itemName -&amp;gt; variable UPDATE = true&lt;/LI&gt;&lt;LI&gt;if row1.itemName not in row4.itemName -&amp;gt; varialbe LOAD = true&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.itemName =&amp;gt; the item to be added in the table&lt;/P&gt;&lt;P&gt;row4.itemName =&amp;gt; the lookup  to see what is already there in the table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then connect the variable to the right column:&lt;/P&gt;&lt;P&gt;Var.LOAD ==true?TalendDate.getDate("dd-MM-yyyy") &amp;gt; LOADDATE (field)&lt;/P&gt;&lt;P&gt;Var.UPDATE ==true?TalendDate.getDate("dd-MM-yyyy") &amp;gt; LASTPDATEDATE (field)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i'm not totally offset with the Talend logic, could you please let me know how to do that with Talend language?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Keihilin&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 10:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343163#M110955</guid>
      <dc:creator>Keihilin</dc:creator>
      <dc:date>2023-01-20T10:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343164#M110956</link>
      <description>&lt;P&gt;I think you can do this in a much simpler way if I understand what you are doing. You simply need to join your lookup to your main row via itemName and set the "Match Model" to "All matches" and the "Join Model" to "Inner Join".  Like in the screenshot below.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ceQifAAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145158iB392F67682BC95A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ceQifAAE.png" alt="0695b00000ceQifAAE.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then create two outputs. The one to carry out the update and the one to carry out the insert. This is managed by the "Catch lookup inner join reject" setting. For the matched data (the data to update) you set this to false (the default). For the unmatched data (the data to insert) you set this to true. Shown below. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ceQikAAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150049iA945D956E2D9DFE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ceQikAAE.png" alt="0695b00000ceQikAAE.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should sort it for you.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 11:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343164#M110956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T11:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343165#M110957</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the detailed explanation with screenshot, that's help a lot.&lt;/P&gt;&lt;P&gt;But, something still not clear to me:&lt;/P&gt;&lt;P&gt;At the end, I would like the "current date" in the field UPDATE or LOAD.&lt;/P&gt;&lt;P&gt;so, I see on your last screenshot, that you linked the value row3.newColumn (if I'm right that's the item I'm comparing)&lt;/P&gt;&lt;P&gt;can I replace the value "row3.newColumn" by TalendDate.getCurrentDate() ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ceRfcAAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141755iEEDD9BDB9C4FA03B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ceRfcAAE.png" alt="0695b00000ceRfcAAE.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or, I must link the Row3.newColumn item to the output ? &lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 13:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343165#M110957</guid>
      <dc:creator>Keihilin</dc:creator>
      <dc:date>2023-01-20T13:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343166#M110958</link>
      <description>&lt;P&gt;The "newColumn" column I added was just an example of any column. The columns I used were not important, it was the settings that I wanted to get across. You can use whatever you like in the input and output tables. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TalendDate.getCurrentDate() will work. But you should probably call it in a tMap variable and share it to the LastUpdateDate and LoadDate columns. This is because you may get different times when you share it to the LOAD output. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, your screenshot looks the wrong way around. Your LOAD should have both the LastUpdateDate AND the LoadDate, your UPDATE should only update the LastUpdateDate I suspect.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 13:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343166#M110958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T13:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Insert date or Update date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343167#M110959</link>
      <description>&lt;P&gt;Hello Rhall,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help, I succeed to perform the task ;o)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-Insert-date-or-Update-date/m-p/2343167#M110959</guid>
      <dc:creator>Keihilin</dc:creator>
      <dc:date>2023-01-24T13:57:32Z</dc:date>
    </item>
  </channel>
</rss>

