<?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 Child job does not insert PK into the last table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Child-job-does-not-insert-PK-into-the-last-table/m-p/2267513#M46376</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a set of two jobs that 1) Parent job -- copy tables to the output database and 2) Child job -- inject PK constraint to the output database.&lt;/P&gt; 
&lt;P&gt;With the following job design, I am able to copy tables and inject PK constraint into the output database.&lt;/P&gt; 
&lt;P&gt;However, &lt;U&gt;&lt;STRONG&gt;the last table didn't have PK constraint inserted --- the child job didn't insert PK into the last table&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;**For more detail please check the attached zip.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;PS. Both job work perfectly when executing separately.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Run Log&lt;/P&gt; 
&lt;PRE&gt;Table Name = tbl_site_mem&lt;BR /&gt;dbo.tbl_site_mem|ALTER TABLE dbo.tbl_site_mem ADD CONSTRAINT PK_tbl_site_mem PRIMARY KEY (site_id, mem_id);
Table Name = dbo.tbl_site_mem 
 AND the Query is = ALTER TABLE dbo.tbl_site_mem ADD CONSTRAINT PK_tbl_site_mem PRIMARY KEY (site_id, mem_id);&lt;/PRE&gt; 
&lt;P&gt;The log also shows that tables are created and its PK are loaded, but PK constraint are not inserted into the table.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Parent job --&amp;nbsp;copy tables to the output database&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parentjob00.png" style="width: 683px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9Xz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142529i53644078649C361B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9Xz.png" alt="0683p000009M9Xz.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Though I set up two DBConnection components, I didn't actually use it for DBOutput...&lt;/P&gt; 
&lt;P&gt;I don't really understand why but when I use an existing connection 'tDBConnection_2', the last table data is not inserted into the database...&lt;/P&gt; 
&lt;P&gt;So I setup DB Connection manually here.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Child job ---&amp;nbsp;inject PK constraint to the output database&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="runjob2.png" style="width: 798px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9Rf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128762i465369105CC45DC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9Rf.png" alt="0683p000009M9Rf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In the child job's DBRow component, I tried both 'use existing connection' and manual setting, but still only the last table didn't have its PK inserted.&lt;/P&gt; 
&lt;P&gt;tDBCommit uses existing connection (as there's no option for manual setup)&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbrow0.png" style="width: 810px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8yy.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146652i25A8F6DA5541A092/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8yy.png" alt="0683p000009M8yy.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please let me know how I can make it work right.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:53:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T02:53:08Z</dc:date>
    <item>
      <title>Child job does not insert PK into the last table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Child-job-does-not-insert-PK-into-the-last-table/m-p/2267513#M46376</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a set of two jobs that 1) Parent job -- copy tables to the output database and 2) Child job -- inject PK constraint to the output database.&lt;/P&gt; 
&lt;P&gt;With the following job design, I am able to copy tables and inject PK constraint into the output database.&lt;/P&gt; 
&lt;P&gt;However, &lt;U&gt;&lt;STRONG&gt;the last table didn't have PK constraint inserted --- the child job didn't insert PK into the last table&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;**For more detail please check the attached zip.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;PS. Both job work perfectly when executing separately.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Run Log&lt;/P&gt; 
&lt;PRE&gt;Table Name = tbl_site_mem&lt;BR /&gt;dbo.tbl_site_mem|ALTER TABLE dbo.tbl_site_mem ADD CONSTRAINT PK_tbl_site_mem PRIMARY KEY (site_id, mem_id);
Table Name = dbo.tbl_site_mem 
 AND the Query is = ALTER TABLE dbo.tbl_site_mem ADD CONSTRAINT PK_tbl_site_mem PRIMARY KEY (site_id, mem_id);&lt;/PRE&gt; 
&lt;P&gt;The log also shows that tables are created and its PK are loaded, but PK constraint are not inserted into the table.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Parent job --&amp;nbsp;copy tables to the output database&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parentjob00.png" style="width: 683px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9Xz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142529i53644078649C361B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9Xz.png" alt="0683p000009M9Xz.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Though I set up two DBConnection components, I didn't actually use it for DBOutput...&lt;/P&gt; 
&lt;P&gt;I don't really understand why but when I use an existing connection 'tDBConnection_2', the last table data is not inserted into the database...&lt;/P&gt; 
&lt;P&gt;So I setup DB Connection manually here.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Child job ---&amp;nbsp;inject PK constraint to the output database&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="runjob2.png" style="width: 798px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9Rf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128762i465369105CC45DC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9Rf.png" alt="0683p000009M9Rf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In the child job's DBRow component, I tried both 'use existing connection' and manual setting, but still only the last table didn't have its PK inserted.&lt;/P&gt; 
&lt;P&gt;tDBCommit uses existing connection (as there's no option for manual setup)&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbrow0.png" style="width: 810px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8yy.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146652i25A8F6DA5541A092/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8yy.png" alt="0683p000009M8yy.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please let me know how I can make it work right.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Child-job-does-not-insert-PK-into-the-last-table/m-p/2267513#M46376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T02:53:08Z</dc:date>
    </item>
  </channel>
</rss>

