<?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: XML Parent - Child Tables in loading multiple files in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707992#M451567</link>
    <description>&lt;P&gt;Just by adding the file name the %key will reset every new load? I will test it right away.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 23:30:50 GMT</pubDate>
    <dc:creator>ChristopherLopMX</dc:creator>
    <dc:date>2020-06-03T23:30:50Z</dc:date>
    <item>
      <title>XML Parent - Child Tables in loading multiple files</title>
      <link>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707976#M451565</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've been looking several posts about this, and I think there are no solutions discuss in the forums, if you happen to know a solution post, please share it with me.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the issue:&lt;/P&gt;&lt;P&gt;I am loading multiple XML files, an app, the problem is that most of this files have parent-child tables, you can see this in the following visualization of the XML file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherLopMX_0-1591220932507.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34909i0BBF49970E6F93B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherLopMX_0-1591220932507.png" alt="ChristopherLopMX_0-1591220932507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I the image you can see for example, how the node: "&amp;lt;cfdi:Conceptos&amp;gt;" its in fact a table with different invoice concepts, but inside this node, there is an other table, from the node: "&amp;lt;cfdi:Traslados&amp;gt;", but this one is a child of&amp;nbsp; :&amp;lt;cfdi:Conceptos&amp;gt;", those two are child tables of: "&amp;lt;cfdi:Comprobante&amp;gt;". When I run the file load wizard, qlikview creates a key to tie the dimensions inside each tables together, for example, if I need the product code, and the tax id from different tables, if this two where related like parent-child in the XML files, then the key will link them together , it does it from the wizard and the key is named: "%Key_(Parent Table Name)_(Some ID generated by qlikview)", here is an example of two keys generated:&lt;/P&gt;&lt;P&gt;%Key_Comprobante_77D75F18365C7329, // Key to parent table: Comprobante&lt;BR /&gt;%Key_Concepto_3FF84D80079AAB80 // Key for this table: Comprobante/Conceptos/Concepto&lt;/P&gt;&lt;P&gt;The comments where also added by the wizard. This works perfect for single file loads, but when I load more than one file, I don't know how to generate a key to like parent and child elements together. I have tried by transforming the information inside each table and mixing in with files names or rates, but it doesn't work all the time, so I was thinking the only way is to find out how to create in script a similar dimension as the "autogenerated" keys the load file wizard sets in the file with individual file load.&lt;/P&gt;&lt;P&gt;I am attaching two XML for testing, also I am sorry but I dont have money to buy the business version so I am working with the personal edition, so if you could help me copy pasting your code in the answer would help me a lot. Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:32:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707976#M451565</guid>
      <dc:creator>ChristopherLopMX</dc:creator>
      <dc:date>2024-11-16T18:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parent - Child Tables in loading multiple files</title>
      <link>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707990#M451566</link>
      <description>&lt;P&gt;The automatically generated key values get reset for each file. So the trick is to add something into the key per file:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;filename() &amp;amp; %Key_Comprobante_77D75F18365C7329,&amp;nbsp; as Key_Comprobante&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank" rel="noopener"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank" rel="noopener"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank" rel="noopener"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 23:20:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707990#M451566</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2020-06-03T23:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parent - Child Tables in loading multiple files</title>
      <link>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707992#M451567</link>
      <description>&lt;P&gt;Just by adding the file name the %key will reset every new load? I will test it right away.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 23:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707992#M451567</guid>
      <dc:creator>ChristopherLopMX</dc:creator>
      <dc:date>2020-06-03T23:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parent - Child Tables in loading multiple files</title>
      <link>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707993#M451568</link>
      <description>&lt;P&gt;I worked like a charm man! I will do some tests to see if I have not lost some information and see if a can do some joins to create a single table, but so far it looks good.&amp;nbsp; Thank you very much!!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 23:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1707993#M451568</guid>
      <dc:creator>ChristopherLopMX</dc:creator>
      <dc:date>2020-06-03T23:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parent - Child Tables in loading multiple files</title>
      <link>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1708037#M451571</link>
      <description>&lt;P&gt;As each xml file begins loading,&amp;nbsp;&lt;SPAN&gt;%Key_Comprobante_77D75F18365C7329 is initialized to zero. It will get incremented by 1 for each nested table, thereby giving each nested table a unique key value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When loading multiple files, you will end up with the key value of "0" being used multiple times.&amp;nbsp; Prepending the filename() means you will have keys like "myFile1.xml0", "myOtherFile.xml0", resulting in unique values even when the key counter is reused.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 04:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/XML-Parent-Child-Tables-in-loading-multiple-files/m-p/1708037#M451571</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2020-06-04T04:45:57Z</dc:date>
    </item>
  </channel>
</rss>

