<?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: update table if and only if any values changed in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361288#M125686</link>
    <description>Hello camsellem, 
&lt;BR /&gt;thank you for your nice post. Well, i have heard about CDC but they are not part of TOS, aren't they. In this case i don't have a source database. I just have a xml file and it is no way to use CDC. Anyway it is interesting to know if there is any workaround to solve this problem in TOS? 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello thongMobi&lt;BR /&gt;No the "action on data" option wont change only the updated values, actually it will update the whole row even if no change occured.&lt;BR /&gt;I f you want to update only the updated records, you should set up a CDC (stand for Change Data Capture) process in your job. To sum it up : all the change in your source database will be save in a log DB (column X : new value : ...) or log file. Then your jobs will read that log DB and update the target database only with the changes.&lt;BR /&gt;Take a look on &lt;A href="http://en.wikipedia.org/wiki/Change_data_capture" rel="nofollow noopener noreferrer"&gt;http://en.wikipedia.org/wiki/Change_data_capture&lt;/A&gt; to have a good resume about CDC&lt;BR /&gt;Depending on your software but many databases vendors have integrated CDC system in their products.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Tue, 09 Feb 2010 08:02:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-02-09T08:02:11Z</dc:date>
    <item>
      <title>update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361284#M125682</link>
      <description>Hi,
&lt;BR /&gt;a newbie in Talend need your help. I am using TOS 3.2.2 to import data from xml files in a table in MSSQL. I want to do following:
&lt;BR /&gt;1/ if the data does not exist in table, do an insert
&lt;BR /&gt;2/ otherwise, do an update if and ony if any values have been changed.
&lt;BR /&gt;By using tMap component and Lookup i can distinguish between insert and update (Looking up for primary keys of the table). But how can i tell Talend to do an update only if the values of fields have been changed. Thank you very much for any advise.</description>
      <pubDate>Sat, 16 Nov 2024 13:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361284#M125682</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361285#M125683</link>
      <description>Hi, thongMobi.. 
&lt;BR /&gt;In the tMSSQLOutput there are options for table (Action on table) and rows (Action on data). 
&lt;BR /&gt;From your post i assumed you use inner join on the primary key fields and create 2 outputs (inner join data &amp;amp; inner join rejects data). The matched joins data shall be updated and the unmatched data shall be inserted into the table right? 
&lt;BR /&gt;So, you can use the options i mentioned earlier. For matched data, use Action on data = update and for unmatched data, use Action on data = insert. The Action on data = update will check the primary keys and then check for any changes in each fields of the row. It will then update the changed fields only. It's advisable that you add an extra field in you table (date_updated) and use getCurrentDate functions so you can have a better tracking on your updated data.. 
&lt;BR /&gt;Hope this will help you mate.. (^_^)</description>
      <pubDate>Mon, 08 Feb 2010 11:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361285#M125683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-08T11:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361286#M125684</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi, thongMobi..&lt;BR /&gt;In the tMSSQLOutput there are options for table (Action on table) and rows (Action on data). &lt;BR /&gt;From your post i assumed you use inner join on the primary key fields and create 2 outputs (inner join data &amp;amp; inner join rejects data). The matched joins data shall be updated and the unmatched data shall be inserted into the table right?&lt;BR /&gt;So, you can use the options i mentioned earlier. For matched data, use Action on data = update and for unmatched data, use Action on data = insert. The Action on data = update will check the primary keys and then check for any changes in each fields of the row. It will then update the changed fields only. It's advisable that you add an extra field in you table (date_updated) and use getCurrentDate functions so you can have a better tracking on your updated data..&lt;BR /&gt;Hope this will help you mate.. (^_^)&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi alucard, 
&lt;BR /&gt;thanks for your post. It helps a lots, really. 
&lt;BR /&gt;&amp;gt; The Action on data = update will check the primary keys and then check for any changes in each fields of the row. It will then update the changed fields only. 
&lt;BR /&gt;How could i do it? Should i do it in tMap component or on the tMSSQLOutput?. Could you please upload an simple example? Thank you</description>
      <pubDate>Mon, 08 Feb 2010 14:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361286#M125684</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-08T14:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361287#M125685</link>
      <description>Hello thongMobi 
&lt;BR /&gt;No the "action on data" option wont change only the updated values, actually it will update the whole row even if no change occured. 
&lt;BR /&gt;I f you want to update only the updated records, you should set up a CDC (stand for Change Data Capture) process in your job. To sum it up : all the change in your source database will be save in a log DB (column X : new value : ...) or log file. Then your jobs will read that log DB and update the target database only with the changes. 
&lt;BR /&gt;Take a look on 
&lt;A href="http://en.wikipedia.org/wiki/Change_data_capture" rel="nofollow noopener noreferrer"&gt;http://en.wikipedia.org/wiki/Change_data_capture&lt;/A&gt; to have a good summary about CDC 
&lt;BR /&gt;Depending on your software but many databases vendors have integrated CDC system in their products.</description>
      <pubDate>Mon, 08 Feb 2010 16:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361287#M125685</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-08T16:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361288#M125686</link>
      <description>Hello camsellem, 
&lt;BR /&gt;thank you for your nice post. Well, i have heard about CDC but they are not part of TOS, aren't they. In this case i don't have a source database. I just have a xml file and it is no way to use CDC. Anyway it is interesting to know if there is any workaround to solve this problem in TOS? 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello thongMobi&lt;BR /&gt;No the "action on data" option wont change only the updated values, actually it will update the whole row even if no change occured.&lt;BR /&gt;I f you want to update only the updated records, you should set up a CDC (stand for Change Data Capture) process in your job. To sum it up : all the change in your source database will be save in a log DB (column X : new value : ...) or log file. Then your jobs will read that log DB and update the target database only with the changes.&lt;BR /&gt;Take a look on &lt;A href="http://en.wikipedia.org/wiki/Change_data_capture" rel="nofollow noopener noreferrer"&gt;http://en.wikipedia.org/wiki/Change_data_capture&lt;/A&gt; to have a good resume about CDC&lt;BR /&gt;Depending on your software but many databases vendors have integrated CDC system in their products.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 09 Feb 2010 08:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361288#M125686</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-09T08:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361289#M125687</link>
      <description>A workaround would be to make a job to compare your file and the last one which was loaded in the database. The delta will contain the data to update or insert. But honestly this kind of comparaison is really hard to do... 
&lt;BR /&gt;Edit : take a look on this OpenSource projet JXyDiff it might help you 
&lt;A href="http://potiron.loria.fr/projects/jxydiff" rel="nofollow noopener noreferrer"&gt;http://potiron.loria.fr/projects/jxydiff&lt;/A&gt;</description>
      <pubDate>Tue, 09 Feb 2010 11:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361289#M125687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-09T11:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361290#M125688</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;A workaround would be to make a job to compare your file and the last one which was loaded in the database. The delta will contain the data to update or insert. But honestly this kind of comparaison is really hard to do...&lt;BR /&gt;Edit : take a look on this OpenSource projet JXyDiff it might help you &lt;A href="http://potiron.loria.fr/projects/jxydiff" rel="nofollow noopener noreferrer"&gt;http://potiron.loria.fr/projects/jxydiff&lt;/A&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi, 
&lt;BR /&gt;thank you for the info. I have tried to solve this with tMap components and LookUp (see screenshot). In tMap_1 i have to look up for the primary keys. The unmatched datas will be inserted into table. The matched datas should go through the tMap_2 component which are looked up for all fields. For the unmached datas an update should be done. Well, that all is just my idea. The problem why i could not connect the tReplicate component to the tMap_2 to do a lookup. Is it impossible in TOS? I hope to hear something from Talend experts. Thank you in advance.</description>
      <pubDate>Tue, 09 Feb 2010 14:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361290#M125688</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-09T14:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361291#M125689</link>
      <description>Hi all, 
&lt;BR /&gt;i have solved this problem by setting the filter expression for the update output. Now it does an update only if any values have been changed. TOS is really powerful. Thank you for all yourd helps 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Thong</description>
      <pubDate>Tue, 09 Feb 2010 15:07:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361291#M125689</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-09T15:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361292#M125690</link>
      <description>plz can u add a screenshot so i can see how did you do that??</description>
      <pubDate>Mon, 29 Mar 2010 14:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361292#M125690</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-29T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361293#M125691</link>
      <description>Hi thongMobi, 
&lt;BR /&gt;Can you share some snapshots so that we can see how you have implemented it? 
&lt;BR /&gt;Other members who have any other suggestions to above problem, please reply. Thanks. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Kshitij</description>
      <pubDate>Fri, 06 May 2011 17:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361293#M125691</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-06T17:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361294#M125692</link>
      <description>Hi thongMobi, 
&lt;BR /&gt;Can you share some snapshots so that we can see how you have implemented it? 
&lt;BR /&gt;Other members who have any other suggestions to above problem, please reply. Thanks.</description>
      <pubDate>Thu, 20 Jun 2013 08:30:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361294#M125692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-20T08:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: update table if and only if any values changed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361295#M125693</link>
      <description>pls share the snapshot of insert / update flow for incremental load.</description>
      <pubDate>Fri, 24 Oct 2014 23:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/update-table-if-and-only-if-any-values-changed/m-p/2361295#M125693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-24T23:07:02Z</dc:date>
    </item>
  </channel>
</rss>

