<?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: Importing/updating DB from CSV in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229550#M20456</link>
    <description>tMysqlBulkExec does not seem to work, because it requires a key. My db table does not have a primary key. I get the error: 
&lt;BR /&gt;Exception in component tMysqlOutputBulkExec_1_tMBE 
&lt;BR /&gt;java.lang.RuntimeException: For bulk update, Schema must have a key at least. 
&lt;BR /&gt; at miljogrep_eos.test_0_1.test.tFileInputDelimited_1Process(test.java:1130) 
&lt;BR /&gt; at miljogrep_eos.test_0_1.test.runJobInTOS(test.java:1425) 
&lt;BR /&gt; at miljogrep_eos.test_0_1.test.main(test.java:1290) 
&lt;BR /&gt;I assume this component wants to do the matching on this key, but I need to do the matching on a date field. 
&lt;BR /&gt;Instead I've tried to use a tMap with a outFilterRejects output like your tutorial: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/tutorials/tutorial.php?language=english&amp;amp;idTuto=9" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/tutorials/tutorial.php?language=english&amp;amp;idTuto=9&lt;/A&gt; 
&lt;BR /&gt;This works fine, except I run into trouble when the dates on the inputs are stored different. The dates sometimes are stored as "2012-03-25 02:00:00.000" and sometimes as "2012-03-25 02:00:00.0". I've tried a workaround using StringHandling function, but no luck. How can I make this work? Is there another function I can use? Please see screenshot. 
&lt;BR /&gt; 
&lt;IMG src="https://www.facebook.com/photo.php?fbid=10151098290451179&amp;amp;set=pb.659021178.-2207520000.1353380853&amp;amp;type=3&amp;amp;theater /&amp;gt;" /&gt; 
&lt;BR /&gt;I'm pretty new to Talend, so any help would be greatly appreciated.</description>
    <pubDate>Tue, 20 Nov 2012 03:11:07 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2012-11-20T03:11:07Z</dc:date>
    <item>
      <title>Importing/updating DB from CSV</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229548#M20454</link>
      <description>Hi,
&lt;BR /&gt;I'm trying to import/update data from a csv file into MySQL database. The csv file will always contain a few records already stored in the database. How can I use Talend to import new records, but update/or ignore already existing records?
&lt;BR /&gt;Should I use the tMysqlOutput component or tMap?</description>
      <pubDate>Sat, 16 Nov 2024 12:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229548#M20454</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T12:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Importing/updating DB from CSV</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229549#M20455</link>
      <description>Hi,
&lt;BR /&gt;You can use the tMysqllBulkExec. You will find a way to update your data in the advanced settings.
&lt;BR /&gt;This component only requires a delimited file in order to insert/update the data into the database.
&lt;BR /&gt;Using the tFileInputDelimited --&amp;gt; tMap --&amp;gt; tMysqlOutput is another valid solution, but could be less efficient.
&lt;BR /&gt;HTH,
&lt;BR /&gt;Rémy.</description>
      <pubDate>Tue, 20 Nov 2012 00:02:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229549#M20455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-20T00:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Importing/updating DB from CSV</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229550#M20456</link>
      <description>tMysqlBulkExec does not seem to work, because it requires a key. My db table does not have a primary key. I get the error: 
&lt;BR /&gt;Exception in component tMysqlOutputBulkExec_1_tMBE 
&lt;BR /&gt;java.lang.RuntimeException: For bulk update, Schema must have a key at least. 
&lt;BR /&gt; at miljogrep_eos.test_0_1.test.tFileInputDelimited_1Process(test.java:1130) 
&lt;BR /&gt; at miljogrep_eos.test_0_1.test.runJobInTOS(test.java:1425) 
&lt;BR /&gt; at miljogrep_eos.test_0_1.test.main(test.java:1290) 
&lt;BR /&gt;I assume this component wants to do the matching on this key, but I need to do the matching on a date field. 
&lt;BR /&gt;Instead I've tried to use a tMap with a outFilterRejects output like your tutorial: 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/tutorials/tutorial.php?language=english&amp;amp;idTuto=9" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/tutorials/tutorial.php?language=english&amp;amp;idTuto=9&lt;/A&gt; 
&lt;BR /&gt;This works fine, except I run into trouble when the dates on the inputs are stored different. The dates sometimes are stored as "2012-03-25 02:00:00.000" and sometimes as "2012-03-25 02:00:00.0". I've tried a workaround using StringHandling function, but no luck. How can I make this work? Is there another function I can use? Please see screenshot. 
&lt;BR /&gt; 
&lt;IMG src="https://www.facebook.com/photo.php?fbid=10151098290451179&amp;amp;set=pb.659021178.-2207520000.1353380853&amp;amp;type=3&amp;amp;theater /&amp;gt;" /&gt; 
&lt;BR /&gt;I'm pretty new to Talend, so any help would be greatly appreciated.</description>
      <pubDate>Tue, 20 Nov 2012 03:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229550#M20456</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-11-20T03:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Importing/updating DB from CSV</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229551#M20457</link>
      <description>Transform text fields containing date formatted values into fields with the data type Date and match them.&lt;BR /&gt;You can do this with the routine TalendDate.parseDate("yyyy-MM-dd HH:mm:ss", yourTextDateField). Change the pattern for every source to fit the incoming format.</description>
      <pubDate>Tue, 20 Nov 2012 07:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229551#M20457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-20T07:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Importing/updating DB from CSV</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229552#M20458</link>
      <description>Excellent. Works like a charm. Thanks!</description>
      <pubDate>Tue, 20 Nov 2012 23:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-updating-DB-from-CSV/m-p/2229552#M20458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-20T23:22:23Z</dc:date>
    </item>
  </channel>
</rss>

