<?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: [resolved] Error with foreign keys in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Error-with-foreign-keys/m-p/2224104#M16950</link>
    <description>Ok i found the solution : i had to drop the concerned tables in my database. 
&lt;BR /&gt;Now it's working again. 
&lt;BR /&gt;Any idea on how i can add correctly a foreign key ?</description>
    <pubDate>Tue, 09 Oct 2012 16:57:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-10-09T16:57:45Z</dc:date>
    <item>
      <title>[resolved] Error with foreign keys</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Error-with-foreign-keys/m-p/2224103#M16949</link>
      <description>Hi, 
&lt;BR /&gt;i have a multiple table database, some linked with a foreign key that is not implemented yet.
&lt;BR /&gt;I tried to add the foreign key with an old topic found on this forum, using a tMysqlRow, then i added the clause "ALTER TABLE my_table ADD FOREIGN KEY (idKey) REFERENCES my_other_table(idKey) .
&lt;BR /&gt;But it didn't work , no error found but no entries in the table.
&lt;BR /&gt;So i deleted the component, and made the job as he was before.
&lt;BR /&gt;
&lt;B&gt;But now, when i'm running it, i have this error and i can't get through it&lt;/B&gt;
&lt;BR /&gt;
&lt;PRE&gt; connecting to socket on port 3547&lt;BR /&gt; connected&lt;BR /&gt;Exception in component tMysqlOutput_10&lt;BR /&gt;com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails&lt;BR /&gt;	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&lt;BR /&gt;	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)&lt;BR /&gt;	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)&lt;BR /&gt;	at java.lang.reflect.Constructor.newInstance(Unknown Source)&lt;BR /&gt;	at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)&lt;BR /&gt;	at com.mysql.jdbc.Util.getInstance(Util.java:384)&lt;BR /&gt;	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)&lt;BR /&gt;	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)&lt;BR /&gt;	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)&lt;BR /&gt;	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)&lt;BR /&gt;	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)&lt;BR /&gt;	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2562)&lt;BR /&gt;	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2512)&lt;BR /&gt; disconnected&lt;BR /&gt;	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:781)&lt;BR /&gt;	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:624)&lt;BR /&gt;	at testdatamining.insertionrsaoptim_0_1.insertionRsaOptim.tFileInputPositional_1Process(insertionRsaOptim.java:16092)&lt;BR /&gt;	at testdatamining.insertionrsaoptim_0_1.insertionRsaOptim.runJobInTOS(insertionRsaOptim.java:25511)&lt;BR /&gt;	at testdatamining.insertionrsaoptim_0_1.insertionRsaOptim.main(insertionRsaOptim.java:25379)&lt;BR /&gt;Job insertionRsaOptim terminé à 15:28 09/10/2012. &lt;/PRE&gt;
&lt;BR /&gt;What i don't understand, is that 
&lt;U&gt;i have deleted the tMysqlRow where there was the clause to add the foreign key, so i don't understand how come talend is still on this.&lt;/U&gt; I tried to delete/add the concerned component, but it's not working...
&lt;BR /&gt;You have a printscreen of the job if needed.
&lt;BR /&gt;If anyone has a lead.. i am taking it.
&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Tue, 09 Oct 2012 16:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Error-with-foreign-keys/m-p/2224103#M16949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-09T16:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Error with foreign keys</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Error-with-foreign-keys/m-p/2224104#M16950</link>
      <description>Ok i found the solution : i had to drop the concerned tables in my database. 
&lt;BR /&gt;Now it's working again. 
&lt;BR /&gt;Any idea on how i can add correctly a foreign key ?</description>
      <pubDate>Tue, 09 Oct 2012 16:57:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Error-with-foreign-keys/m-p/2224104#M16950</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-09T16:57:45Z</dc:date>
    </item>
  </channel>
</rss>

