<?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>question Re: Getting Duplicate records in MySQL database in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175575#M75442</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;It worked like charm. Thanks a lot for the quick response.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 20:36:49 GMT</pubDate>
    <dc:creator>ramesh_ganginen</dc:creator>
    <dc:date>2018-03-07T20:36:49Z</dc:date>
    <item>
      <title>Getting Duplicate records in MySQL database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175573#M75440</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="64527-screen-shot-2018-03-07-at-50438-pm.png" style="width: 966px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19780i377D6CD894E2EECA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="64527-screen-shot-2018-03-07-at-50438-pm.png" alt="64527-screen-shot-2018-03-07-at-50438-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm trying to copy the data from one database(MySQL) to another database(MySQL). Below is the flow. &lt;/P&gt;&lt;P&gt;GenerateTableFetch Partition Size : 1500 records. Total 3200 records so it's creating 3 files as shown in the picture. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="64532-main.png" style="width: 980px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19781i8E7097C3D01E5098/image-size/medium?v=v2&amp;amp;px=400" role="button" title="64532-main.png" alt="64532-main.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm able to read the data from the source database(avro format) and convert the data to json(using AvrotoJSON processor). Now I'm trying to load the JSON data into MySQL table using ConvertJSONTOSQL Pricessor. In the source table I have 3200&lt;/P&gt;&lt;P&gt; records, however in my destination table I'm getting 10000+ records. I didn't get where I did mis configuration so that it's inserting duplicate records into destination table. Below are screenshots of the individual processors.&lt;/P&gt;&lt;P&gt;Any suggestions please.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6018i0899BFFAE1470F59/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="putsql.png" title="putsql.png" /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6019i3B4E35C3BE5EFD70/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="execute-sql.png" title="execute-sql.png" /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6020i8B062A87A98B7C07/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="convertavrotojson.png" title="convertavrotojson.png" /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6021i39F4E5361E32481C/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="convertjsontosql.png" title="convertjsontosql.png" /&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:07:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175573#M75440</guid>
      <dc:creator>ramesh_ganginen</dc:creator>
      <dc:date>2019-08-18T10:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Duplicate records in MySQL database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175574#M75441</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/70238/rameshgangineni1991.html" nodeid="70238" target="_blank"&gt;@User 805&lt;/A&gt;&lt;P&gt;You need to &lt;STRONG&gt;autoterminate &lt;/STRONG&gt;original relationship in&lt;STRONG&gt; ConvertJSONtoSQL&lt;/STRONG&gt; processor, now original relationship is loop back into same processor again which is causing all the duplicates in mysql database.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62696-autoterminate.png" style="width: 901px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19778i92E9445E6968F6A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62696-autoterminate.png" alt="62696-autoterminate.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;How to Autoterminate original relationship:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;clear the queue first.&lt;/LI&gt;&lt;LI&gt;delete the original relationship&lt;/LI&gt;&lt;LI&gt;right click on processor &lt;/LI&gt;&lt;LI&gt;goto setting tab&lt;/LI&gt;&lt;LI&gt;click on checkbox at original relationship as shown in the below screenshot&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62697-autoterminate-steps.png" style="width: 1867px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19779i8E50C3C911FE8152/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62697-autoterminate-steps.png" alt="62697-autoterminate-steps.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue, &lt;STRONG&gt;Click on Accept button below to accept the answer,&lt;/STRONG&gt; That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:07:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175574#M75441</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T10:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Duplicate records in MySQL database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175575#M75442</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;It worked like charm. Thanks a lot for the quick response.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 20:36:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Duplicate-records-in-MySQL-database/m-p/175575#M75442</guid>
      <dc:creator>ramesh_ganginen</dc:creator>
      <dc:date>2018-03-07T20:36:49Z</dc:date>
    </item>
  </channel>
</rss>

