<?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: Inserting into MySql parent/child tables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322484#M92423</link>
    <description>&lt;P&gt;Thank you for your response.&amp;nbsp; This example does go some way to achieving what I am after but I can't see how to create more than one entry in the daughter table for a single entry in the mother table.&amp;nbsp;If I use more than one daughter schema I am unsure how you would get the primary key of the mother table to daughter records after the first.&amp;nbsp; To be clear I want something like this very simplified example:&lt;/P&gt;
&lt;PRE&gt;Name         Telephone1    Telephone2
Fred         01752123456   07813925637
Bill         NULL          07813765642
Eric         NULL          NULL

ID Name
1  Fred
2  Bill
3  Eric

PID Telephone
1   01752123456
1   07813925637
2   07813765642&lt;/PRE&gt;
&lt;P&gt;This shows the input, the output parent and the output daughter table.&amp;nbsp; Note that the Parent ID (PID)&amp;nbsp; = 1 appears twice in the daughter table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 May 2018 10:26:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-22T10:26:04Z</dc:date>
    <item>
      <title>Inserting into MySql parent/child tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322482#M92421</link>
      <description>&lt;P&gt;I need to migrate a lot of data from an old "flat-file" style database into a more modern structured database.&amp;nbsp; A specific example is where I have a source table for an organisation that has details of two telephone contacts in two sets of columns.&amp;nbsp; The target database uses an organisation parent table and a organisation_contact child table.&amp;nbsp; The organisation_contact table has a foreign key column that relates to the organisation.&lt;/P&gt;
&lt;P&gt;I can populate the organisation table and I can obtain the last insert id. The attached image shows the project layout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;row4 contains the organisation id and the columns inserted into the organisation table.&lt;/P&gt;
&lt;P&gt;row1 contains the telephone contact data for each organisation.&amp;nbsp; The telephone data is filtered out by tMap_1 because it doesn't belong in the organisation table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't figure out how to bring these together to write the&amp;nbsp;&lt;SPAN&gt;organisation_contact&amp;nbsp;table with 0, 1 or&amp;nbsp;2 rows depending on the data in the input schema.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 11:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322482#M92421</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-11T11:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting into MySql parent/child tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322483#M92422</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;Here is a scenario about:&lt;A title="TalendHelpCenter: Inserting data in mother/daughter tables" href="https://help.talend.com/reader/aMa3LeRerDnYLmJvEPq0bw/5oTBNq7Vx8i3vvPAgMtbdg" target="_self" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter: Inserting data in mother/daughter tables&lt;/A&gt;.&lt;/P&gt; 
&lt;P&gt;Let us know if it is what you are looking for.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 09:17:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322483#M92422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-22T09:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting into MySql parent/child tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322484#M92423</link>
      <description>&lt;P&gt;Thank you for your response.&amp;nbsp; This example does go some way to achieving what I am after but I can't see how to create more than one entry in the daughter table for a single entry in the mother table.&amp;nbsp;If I use more than one daughter schema I am unsure how you would get the primary key of the mother table to daughter records after the first.&amp;nbsp; To be clear I want something like this very simplified example:&lt;/P&gt;
&lt;PRE&gt;Name         Telephone1    Telephone2
Fred         01752123456   07813925637
Bill         NULL          07813765642
Eric         NULL          NULL

ID Name
1  Fred
2  Bill
3  Eric

PID Telephone
1   01752123456
1   07813925637
2   07813765642&lt;/PRE&gt;
&lt;P&gt;This shows the input, the output parent and the output daughter table.&amp;nbsp; Note that the Parent ID (PID)&amp;nbsp; = 1 appears twice in the daughter table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 10:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-into-MySql-parent-child-tables/m-p/2322484#M92423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-22T10:26:04Z</dc:date>
    </item>
  </channel>
</rss>

