<?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: Merge two XML files - Same Schema - Multiple loop in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330793#M99841</link>
    <description>&lt;P&gt;How big are these files likely to get? Are the files likely to be pretty consistent with what you have shown? The reason I ask is that there is a complicated way of doing this by stripping all of the data out and rebuilding from scratch (the safest way as well), or there is the quick and easy way of doing this. The quick and easy way would be to ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Use a tExtractXMLField component to extract the "PersonalFields" section&lt;/P&gt;&lt;P&gt;2) Convert the above to a String&lt;/P&gt;&lt;P&gt;3) Take the other file and convert it to a String&lt;/P&gt;&lt;P&gt;4) Use String manipulation to insert the "PersonalFields" section inside the other XML String&lt;/P&gt;&lt;P&gt;5) Use a tConvertType to convert the resultant String to a Document for further processing (if necessary)&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2017 09:25:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-06T09:25:04Z</dc:date>
    <item>
      <title>Merge two XML files - Same Schema - Multiple loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330792#M99840</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can you help or advice how the following two xml files can be merge together please?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;File 1:&lt;/P&gt; 
&lt;P&gt;Loop element : &amp;lt;addressList&amp;gt;&lt;/P&gt; 
&lt;P&gt;Group element : &amp;lt;debtor&amp;gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sdfg.PNG" style="width: 426px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw7W.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135893iF6F0ACE7DDEC7819/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw7W.png" alt="0683p000009Lw7W.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;File 2 :&lt;/P&gt; 
&lt;P&gt;Loop element : &amp;lt;personalFields&amp;gt;&lt;/P&gt; 
&lt;P&gt;Group element : &amp;lt;debtor&amp;gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dfg.PNG" style="width: 429px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwZx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138863i13258900469F4345/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwZx.png" alt="0683p000009LwZx.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The output should be as follows:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fgh.PNG" style="width: 426px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwGK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134660i2DAC725FB2E22264/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwGK.png" alt="0683p000009LwGK.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Normally clientNum and debtorReferenceNum are the primary key in both files.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I cannot use "Append xml" as i am currently using Generation mode : Fast with low memory consumption&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330792#M99840</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2024-11-16T09:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Merge two XML files - Same Schema - Multiple loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330793#M99841</link>
      <description>&lt;P&gt;How big are these files likely to get? Are the files likely to be pretty consistent with what you have shown? The reason I ask is that there is a complicated way of doing this by stripping all of the data out and rebuilding from scratch (the safest way as well), or there is the quick and easy way of doing this. The quick and easy way would be to ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Use a tExtractXMLField component to extract the "PersonalFields" section&lt;/P&gt;&lt;P&gt;2) Convert the above to a String&lt;/P&gt;&lt;P&gt;3) Take the other file and convert it to a String&lt;/P&gt;&lt;P&gt;4) Use String manipulation to insert the "PersonalFields" section inside the other XML String&lt;/P&gt;&lt;P&gt;5) Use a tConvertType to convert the resultant String to a Document for further processing (if necessary)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 09:25:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330793#M99841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-06T09:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Merge two XML files - Same Schema - Multiple loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330794#M99842</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you for your reply. I will try to explain you my idea.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Normally, i have 3 csv files.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;debtors.csv &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 15 Mb (contain 90,000 debtors/rows)&lt;/P&gt; 
&lt;P&gt;addresses.csv &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;nbsp;30 Mb (contain 265,000 addresses/rows - a debtor can have a maximum of 3 addresses based on addressType : RES, INV, BEP] )&lt;/P&gt; 
&lt;P&gt;personalfields.csv &amp;nbsp; - 200 Mb&amp;nbsp;&lt;SPAN&gt;(contain 6,000,000 personalfields/rows - a debtor can have a maximum of 80 personalfields based on personalfields name [see xml below])&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;In other words :&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;A debtor can have many addresses.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;A debtor can have many personal fields.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;In each 3 csv files, i have 2 primary keys (clientnum, debtorreferencenumber).&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I want to generate an xml file with the following output :&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;debtors&amp;gt;
    &amp;lt;debtor&amp;gt;
        &amp;lt;clientNum&amp;gt;14069&amp;lt;/clientNum&amp;gt;
        &amp;lt;debtorReferenceNumber&amp;gt;aa3373f5ae604ff883b3686086626d&amp;lt;/debtorReferenceNumber&amp;gt;
        &amp;lt;activityCode&amp;gt;53168&amp;lt;/activityCode&amp;gt;
        &amp;lt;debtorName&amp;gt;Debtor_name_5441&amp;lt;/debtorName&amp;gt;
        &amp;lt;addressList&amp;gt;
            &amp;lt;address&amp;gt;
                &amp;lt;addressType&amp;gt;INV&amp;lt;/addressType&amp;gt;
                &amp;lt;countryCode&amp;gt;CC86&amp;lt;/countryCode&amp;gt;
                &amp;lt;address1&amp;gt;Address 1 - 6152&amp;lt;/address1&amp;gt;
                &amp;lt;address2&amp;gt;Address 2 - 2252&amp;lt;/address2&amp;gt;
                &amp;lt;address3&amp;gt;Address 3 - 4624&amp;lt;/address3&amp;gt;
                &amp;lt;postalCode&amp;gt;8964&amp;lt;/postalCode&amp;gt;
            &amp;lt;/address&amp;gt;
            &amp;lt;address&amp;gt;
                &amp;lt;addressType&amp;gt;RES&amp;lt;/addressType&amp;gt;
                &amp;lt;countryCode&amp;gt;CC16&amp;lt;/countryCode&amp;gt;
                &amp;lt;address1&amp;gt;Address 1 - 3289&amp;lt;/address1&amp;gt;
                &amp;lt;address2&amp;gt;Address 2 - 3198&amp;lt;/address2&amp;gt;
                &amp;lt;address3&amp;gt;Address 3 - 7812&amp;lt;/address3&amp;gt;
                &amp;lt;postalCode&amp;gt;5284&amp;lt;/postalCode&amp;gt;
            &amp;lt;/address&amp;gt;
        &amp;lt;/addressList&amp;gt;
        &amp;lt;telephone&amp;gt;8582357&amp;lt;/telephone&amp;gt;
	&amp;lt;mobile&amp;gt;5464643&amp;lt;/mobile&amp;gt;
        &amp;lt;ACHPersonalFields&amp;gt;
            &amp;lt;ACHPersonalField&amp;gt;
                &amp;lt;clientNum&amp;gt;14069&amp;lt;/clientNum&amp;gt;
                &amp;lt;debtorReferenceNumber&amp;gt;aa3373f5ae604ff883b3686086626d&amp;lt;/debtorReferenceNumber&amp;gt;
                &amp;lt;personalFieldName&amp;gt;Location&amp;lt;/personalFieldName&amp;gt;
                &amp;lt;personalFieldValue&amp;gt;value - 13098&amp;lt;/personalFieldValue&amp;gt;
            &amp;lt;/ACHPersonalField&amp;gt;
            &amp;lt;ACHPersonalField&amp;gt;
                &amp;lt;clientNum&amp;gt;14069&amp;lt;/clientNum&amp;gt;
                &amp;lt;debtorReferenceNumber&amp;gt;aa3373f5ae604ff883b3686086626d&amp;lt;/debtorReferenceNumber&amp;gt;
                &amp;lt;personalFieldName&amp;gt;Active&amp;lt;/personalFieldName&amp;gt;
                &amp;lt;personalFieldValue&amp;gt;Oui&amp;lt;/personalFieldValue&amp;gt;
            &amp;lt;/ACHPersonalField&amp;gt;
            &amp;lt;ACHPersonalField&amp;gt;
                &amp;lt;clientNum&amp;gt;14069&amp;lt;/clientNum&amp;gt;
                &amp;lt;debtorReferenceNumber&amp;gt;aa3373f5ae604ff883b3686086626d&amp;lt;/debtorReferenceNumber&amp;gt;
                &amp;lt;personalFieldName&amp;gt;Annual Turnover&amp;lt;/personalFieldName&amp;gt;
                &amp;lt;personalFieldValue&amp;gt;316.09&amp;lt;/personalFieldValue&amp;gt;
            &amp;lt;/ACHPersonalField&amp;gt;
        &amp;lt;/ACHPersonalFields&amp;gt;
    &amp;lt;/debtor&amp;gt;
    &amp;lt;debtor&amp;gt;
	...
	...
	...
    &amp;lt;/debtor&amp;gt;
&amp;lt;/debtors&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;can you advice please?&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 11:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330794#M99842</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2017-09-06T11:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Merge two XML files - Same Schema - Multiple loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330795#M99843</link>
      <description>&lt;P&gt;You should still be able to approach this problem using the abstracted solution I suggested above. However, it may be slightly more fiddly. Essentially, you will need to extract each of the complex types as nodes with a key relating it to the debtor. Once you have extracted each of the complex types with their debtor keys, you can use String manipulation to rebuild them ensuring the xml blocks are linked to the correct debtor.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I should point out that I am suggesting this on the assumption you are using the Open Source solution. If you are using the Enterprise Edition, you might want to consider rebuilding completely using the Talend Data Mapper.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 22:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330795#M99843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-06T22:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Merge two XML files - Same Schema - Multiple loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330796#M99844</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am current using TOS Big Data 6.4&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Also note that I am a new in using this application.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can u explain me step by step on how should i proceed with the complex but safest way?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can you provide an example related to my situation?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you in advance.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capturec.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwZt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135341i8302C5E6761A9168/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwZt.png" alt="0683p000009LwZt.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;</description>
      <pubDate>Thu, 07 Sep 2017 14:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330796#M99844</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2017-09-07T14:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Merge two XML files - Same Schema - Multiple loop</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330797#M99845</link>
      <description>&lt;P&gt;It's very difficult to explain how to do this in detail I'm afraid. It would be quicker for you to post whatever data examples you have and I might be able to knock up a quick example. I'm not promising it will be the complete solution, but I should be able to provide a good basis.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 17:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-XML-files-Same-Schema-Multiple-loop/m-p/2330797#M99845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-07T17:32:18Z</dc:date>
    </item>
  </channel>
</rss>

