<?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: tmap -Single transaction delete before insert in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239489#M27261</link>
    <description>Hi&amp;nbsp; 
&lt;BR /&gt;Do an inner join to get exiting records and new records, cache the new records or old records in memory for used in next subjob, eg: 
&lt;BR /&gt;t...connection 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;| 
&lt;BR /&gt;source data--...--&amp;gt;tMap---eixsting records-- 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tgreenplumoutput (for deleting)&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --new records--tHashOutput&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;|&lt;BR /&gt;onsubjobok&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;|&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tHashInput--main--&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tgreenplumoutput (for inserting)&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;-onsubjobok--t...commit&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;-onsubjoberror--t..Rollback.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Regards&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Shong&lt;/FONT&gt;&lt;/FONT&gt;</description>
    <pubDate>Mon, 06 Feb 2017 03:35:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-06T03:35:13Z</dc:date>
    <item>
      <title>tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239488#M27260</link>
      <description>We tried to figure out how to do the following within a tamp mapping? 
&lt;BR /&gt; 
&lt;B&gt;&amp;nbsp;Scenario :&lt;/B&gt; 
&lt;BR /&gt;For each record read 
&lt;BR /&gt;Start transaction 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Identify existing records 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Delete the existing records 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Insert new records from source 
&lt;BR /&gt;End transaction 
&lt;BR /&gt;Job flow &amp;nbsp;: 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DeleteFlow 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 
&lt;BR /&gt;read from sql server(source) --&amp;gt;write into HDFS --&amp;gt;tmap --&amp;gt;insert Flow --&amp;gt;tgreenplumoutput 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Lookup target file 
&lt;BR /&gt; 
&lt;BR /&gt;Source to target Lookup model screenshot : 
&lt;BR /&gt;source table left join Target table --&amp;gt;Output Flow--&amp;gt; Delete complete record otherwise Insert flow all data again (when Matched ID is null) 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/270233/S2TLookupProperty.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDEv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134965iCE7C72C2EB6166F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDEv.png" alt="0683p000009MDEv.png" /&gt;&lt;/span&gt; &lt;/A&gt;&amp;nbsp; 
&lt;BR /&gt;Tested : 
&lt;BR /&gt;When i am pulling 6 records from source it is inserting 6 well as output. but then if i increase `1 record in source &amp;nbsp;job goes to infinite loop it is not even throwing error. It should first delete the 6 already inserted and then insert all 7 again. but it is not working as expected. 
&lt;BR /&gt;Any help on it would be much appreciated 
&lt;BR /&gt;Job flow screenshot: 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/270233/dataflow.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDES.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140158iC5598366A49C24B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDES.png" alt="0683p000009MDES.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT color="#555555"&gt;&lt;FONT size="2"&gt;&lt;FONT face="futura-pt, sans-serif"&gt;If we did not have the requirement of a single transaction, I would build two separate jobs, one to delete, the other to insert.&amp;nbsp; But the requirement for a single transaction is making this hard.&amp;nbsp; Also will need to guarantee that we Delete before we Insert.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:06:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239488#M27260</guid>
      <dc:creator>gt0731</dc:creator>
      <dc:date>2024-11-16T10:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239489#M27261</link>
      <description>Hi&amp;nbsp; 
&lt;BR /&gt;Do an inner join to get exiting records and new records, cache the new records or old records in memory for used in next subjob, eg: 
&lt;BR /&gt;t...connection 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;| 
&lt;BR /&gt;source data--...--&amp;gt;tMap---eixsting records-- 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tgreenplumoutput (for deleting)&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --new records--tHashOutput&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;|&lt;BR /&gt;onsubjobok&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;|&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tHashInput--main--&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tgreenplumoutput (for inserting)&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;-onsubjobok--t...commit&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp; &amp;nbsp;-onsubjoberror--t..Rollback.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Regards&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Shong&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 06 Feb 2017 03:35:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239489#M27261</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-06T03:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239490#M27262</link>
      <description>Hi shong, 
&lt;BR /&gt;First of all thanks for data flow. it worked for me. 
&lt;BR /&gt;But also when I Executed same as you mentioned. for ~90k records.&amp;nbsp; 
&lt;BR /&gt;job execution time =18 min.&amp;nbsp; 
&lt;BR /&gt;Goal is : 
&lt;BR /&gt;How do i get incremental load in greenplum data warehouse. please guide because 2 flow based current approach is not improving the performance as expected. 
&lt;BR /&gt;&amp;nbsp;it is protocol to write &amp;nbsp;source data into hadoop &amp;nbsp;-source data ---&amp;gt; hdfs (for archive purpose)--&amp;gt;tgreenplumoutput. 
&lt;BR /&gt;Any help on it would be much appreciated . 
&lt;BR /&gt; 
&lt;BR /&gt;&amp;nbsp;</description>
      <pubDate>Mon, 06 Feb 2017 06:14:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239490#M27262</guid>
      <dc:creator>gt0731</dc:creator>
      <dc:date>2017-02-06T06:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239491#M27263</link>
      <description>Do you really need to check if the same records already exist in target table? or just delete all the data in target table and insert the source data. Cache the small data in memory, if the lookup data set is a little large, cache the data on disk instead of memory on tMap.&amp;nbsp;</description>
      <pubDate>Mon, 06 Feb 2017 06:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239491#M27263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-06T06:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239492#M27264</link>
      <description>Thanks in advance &amp;nbsp;shong ! 
&lt;BR /&gt;I &amp;nbsp;would like to write the Just delete all from target and then &amp;nbsp;insert all again.However, Lookup Contains huge amount of data. When i &amp;nbsp;turned on Stored data on disk =TRUE .&amp;nbsp; 
&lt;BR /&gt;Still ,getting the same execution time because &amp;nbsp;Job visual clearly says data batch while outputting into tgreenplumOutput is slow. it consist of default batch value =10000.&amp;nbsp;</description>
      <pubDate>Mon, 06 Feb 2017 14:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239492#M27264</guid>
      <dc:creator>gt0731</dc:creator>
      <dc:date>2017-02-06T14:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239493#M27265</link>
      <description>If you want to delete all data in target table before inserting, you can use a tGreenplumRow to execute a delete statement to delete all data.
&lt;BR /&gt;
&lt;BR /&gt;t...connection
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;tGreenPlumRow (delete statement)--oncomponentok--source data--...write into HDFS --oncomponentok--&amp;gt;-tgreenplumoutput (for inserting)
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;-onsubjobok--t...commit
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;-onsubjoberror--t..Rollback.</description>
      <pubDate>Tue, 07 Feb 2017 03:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239493#M27265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-07T03:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239494#M27266</link>
      <description>&amp;nbsp;Thanks shong ! 
&lt;BR /&gt;I have tried this flow. This looks better But again it is full load.&amp;nbsp; 
&lt;BR /&gt;Also trying for Incremental Load. 
&lt;BR /&gt;In that,I am not able to Identify changed / new row. However,I cannot perform CDC &amp;nbsp;from source system. As i have read access only for extracting the data from source system. Is that possible to perform Incremental Load with given pipeline. it is difficult to me track &amp;nbsp;new/updated rows and output only this into greenplum. Instead of Full load. &amp;nbsp; 
&lt;BR /&gt; 
&lt;I&gt;&lt;FONT size="2"&gt;&lt;FONT face="Georgia, " times="" new="" roman=""&gt;I'm hoping you can guide me with.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;</description>
      <pubDate>Tue, 07 Feb 2017 11:30:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239494#M27266</guid>
      <dc:creator>gt0731</dc:creator>
      <dc:date>2017-02-07T11:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239495#M27267</link>
      <description>Without CDC, you have to compare the source data and target data to get respectively rows that need to be updated and inserted, that is to do an inner join between source data and target data like you did, obviously, the performance of this way is much lower than CDC if the target data volume is big.</description>
      <pubDate>Wed, 08 Feb 2017 02:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239495#M27267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T02:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239496#M27268</link>
      <description>Hi Shong, 
&lt;BR /&gt;I was not able to find how to start a new topic so I have to do this way. I am currently working on a CDC job that should run in both sequences depending upon the timestamp of changes or logs. Sequences are a job that runs in the order of Insert update delete or in the order of delete update insert job run on two conditions. This is to avoid constraint error. Because if row being delete and reinsert with the same primary key will throw error&amp;nbsp;or lose records. I am also passing many context variables to those jobs. &amp;nbsp;I am not able to work with conditional run using tjavarow or tjava with if statements on string. Is there a way to do with if else condition on trunjob&amp;nbsp; and also pass values to the tmap&amp;nbsp;from that conditions. &amp;nbsp; 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;kmv</description>
      <pubDate>Tue, 28 Feb 2017 04:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239496#M27268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-28T04:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: tmap -Single transaction delete before insert</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239497#M27269</link>
      <description>&lt;P&gt;In the Delete scenario, firstly, I need to compare date of source and target (by extracting date from timestamp) - delete the matching records, then I've to insert the new records (for the deleted date) to the target. How can i achieve this? &lt;/P&gt;&lt;P&gt;source - .csv file, target - postgresql database&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 06:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-Single-transaction-delete-before-insert/m-p/2239497#M27269</guid>
      <dc:creator>Soumya_M</dc:creator>
      <dc:date>2023-03-03T06:06:26Z</dc:date>
    </item>
  </channel>
</rss>

