<?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: Help with tMysqlRow - Unable to delete Data in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276477#M52539</link>
    <description>yes. When you load the original csv, log the file name into a control table-- also you will want to generate a load_id that will be tagged onto every row of data loaded from that csv.&lt;BR /&gt;when you receive a file of the same name, you will be able to retrieve the load_id, and then use that to delete all data associated with the previous file before loading the new one.</description>
    <pubDate>Wed, 21 Jul 2010 19:03:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-07-21T19:03:27Z</dc:date>
    <item>
      <title>Help with tMysqlRow - Unable to delete Data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276474#M52536</link>
      <description>Hi all, 
&lt;BR /&gt;I currently have a job where I have to upload CSV data into a database on a monthly basis. This job is working fine. 
&lt;BR /&gt;I now have a scenario where I am to re-enter a particular month data into the database. 
&lt;BR /&gt; 
&lt;BR /&gt;For this - 
&lt;BR /&gt;a) I need to delete the same month data already present in the database. 
&lt;BR /&gt;b) Then re-upload the data for that particular month from the CSV file. 
&lt;BR /&gt; 
&lt;BR /&gt;As such, I modified my current job and added a tMysqlRow component with a Delete query. I tried to place an "OnComponentOk" on my input CSV file to link with the tMysqlRow component. 
&lt;BR /&gt;When I run the job, I see duplicate records for a particular month in the database ( Old monthly data does not get deleted) 
&lt;BR /&gt;Could someone help me on this.... 
&lt;BR /&gt;Best Regards, 
&lt;BR /&gt;Zohaib</description>
      <pubDate>Sat, 16 Nov 2024 13:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276474#M52536</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with tMysqlRow - Unable to delete Data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276475#M52537</link>
      <description>The OnComponentOK link does not always do what you expect. This has to do with the architecture of Talend-- each component consists of a BEGIN, MAIN, and END section. The OnComponentOK trigger fires when the MAIN section of the code completes without error. Because of this, I always recommend avoiding using this trigger type unless you are sure of what it will do for that specific component.
&lt;BR /&gt;I would suggest reworking your job to avoid use of OnComponentOK. to accomplish this, I imagine a high-level job structure like this:
&lt;BR /&gt;1) examine file and compare to control table. is this a new file?
&lt;BR /&gt;2) if it exists in the control table, delete all rows in data table and control table with the same load_id. if it does not exist in the control table, do nothing
&lt;BR /&gt;3) Create row for control table and Load the file.</description>
      <pubDate>Tue, 20 Jul 2010 21:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276475#M52537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-20T21:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with tMysqlRow - Unable to delete Data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276476#M52538</link>
      <description>Thanks for the reply.
&lt;BR /&gt;I do not have a specific ID/Key field in the table. As such, I cannot determine, if the data in the CSV contains new rows or not.
&lt;BR /&gt;Is there a way, where I can execute a delete operation, before the CSV data is loaded into the table?
&lt;BR /&gt;Thanks again,
&lt;BR /&gt;Zohaib</description>
      <pubDate>Wed, 21 Jul 2010 16:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276476#M52538</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-07-21T16:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with tMysqlRow - Unable to delete Data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276477#M52539</link>
      <description>yes. When you load the original csv, log the file name into a control table-- also you will want to generate a load_id that will be tagged onto every row of data loaded from that csv.&lt;BR /&gt;when you receive a file of the same name, you will be able to retrieve the load_id, and then use that to delete all data associated with the previous file before loading the new one.</description>
      <pubDate>Wed, 21 Jul 2010 19:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-with-tMysqlRow-Unable-to-delete-Data/m-p/2276477#M52539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-21T19:03:27Z</dc:date>
    </item>
  </channel>
</rss>

