<?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 How to build a Loop XPath Query that will return both with records and without records on the child element? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249868#M34271</link>
    <description>&lt;P&gt;Hello Folks,&lt;BR /&gt;I have these JSON responses:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;/*******1 - JSON without child elements on record node************/
{
    "totalSize": 0,
    "done": true,
    "records": []
}
/*******2 - JSON with child elements on record node************/
{
    "totalSize": 2,
    "done": true,
    "records": [
        {
            "attributes": {
                "type": "Transaction_History__c",
                "url": "/services/data/v45.0/sobjects/Transaction_History__c/987654321"
            },
            "Id": "987654321"
        },
        {
            "attributes": {
                "type": "Transaction_History__c",
                "url": "/services/data/v45.0/sobjects/Transaction_History__c/123456789"
            },
            "Id": "123456789"
        }
    ]
}&lt;/PRE&gt; 
&lt;P&gt;&lt;STRONG&gt;First configuration:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="with XPath" style="width: 537px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8WM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130252i89D5E16D629E2685/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8WM.png" alt="0683p000009M8WM.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;with XPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For 1st response &amp;amp; 2nd response, respectively it has an output of:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="withXPath" style="width: 356px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8WR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139260i4C8ECBC3DF046EC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8WR.png" alt="0683p000009M8WR.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;withXPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;2nd configuration:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Blank Loop XPath" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8IW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156313iC10BC7BC7421EA4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8IW.png" alt="0683p000009M8IW.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Blank Loop XPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;For 1st response &amp;amp; 2nd response, respectively it has an output of:&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="w/oXPath" style="width: 925px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8WW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158166iC443EDB2FADA8597/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8WW.png" alt="0683p000009M8WW.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;w/oXPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Now, what I want to achieve are these output:&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected Output" style="width: 935px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Pr.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141441i13D298AB257C42E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Pr.png" alt="0683p000009M8Pr.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Expected Output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;Can you please help me achieve this expected output? I believe it will be solved by correct mapping but I can't figure it out, have tried several combinations.&lt;BR /&gt;Thank you so much!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 13:49:49 GMT</pubDate>
    <dc:creator>jerownimow</dc:creator>
    <dc:date>2019-11-11T13:49:49Z</dc:date>
    <item>
      <title>How to build a Loop XPath Query that will return both with records and without records on the child element?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249868#M34271</link>
      <description>&lt;P&gt;Hello Folks,&lt;BR /&gt;I have these JSON responses:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;/*******1 - JSON without child elements on record node************/
{
    "totalSize": 0,
    "done": true,
    "records": []
}
/*******2 - JSON with child elements on record node************/
{
    "totalSize": 2,
    "done": true,
    "records": [
        {
            "attributes": {
                "type": "Transaction_History__c",
                "url": "/services/data/v45.0/sobjects/Transaction_History__c/987654321"
            },
            "Id": "987654321"
        },
        {
            "attributes": {
                "type": "Transaction_History__c",
                "url": "/services/data/v45.0/sobjects/Transaction_History__c/123456789"
            },
            "Id": "123456789"
        }
    ]
}&lt;/PRE&gt; 
&lt;P&gt;&lt;STRONG&gt;First configuration:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="with XPath" style="width: 537px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8WM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130252i89D5E16D629E2685/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8WM.png" alt="0683p000009M8WM.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;with XPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For 1st response &amp;amp; 2nd response, respectively it has an output of:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="withXPath" style="width: 356px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8WR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139260i4C8ECBC3DF046EC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8WR.png" alt="0683p000009M8WR.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;withXPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;2nd configuration:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Blank Loop XPath" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8IW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156313iC10BC7BC7421EA4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8IW.png" alt="0683p000009M8IW.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Blank Loop XPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;For 1st response &amp;amp; 2nd response, respectively it has an output of:&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="w/oXPath" style="width: 925px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8WW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158166iC443EDB2FADA8597/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8WW.png" alt="0683p000009M8WW.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;w/oXPath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Now, what I want to achieve are these output:&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected Output" style="width: 935px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Pr.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141441i13D298AB257C42E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Pr.png" alt="0683p000009M8Pr.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Expected Output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;Can you please help me achieve this expected output? I believe it will be solved by correct mapping but I can't figure it out, have tried several combinations.&lt;BR /&gt;Thank you so much!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 13:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249868#M34271</guid>
      <dc:creator>jerownimow</dc:creator>
      <dc:date>2019-11-11T13:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a Loop XPath Query that will return both with records and without records on the child element?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249869#M34272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Read by xpath and set the loop xpath to&amp;nbsp;/root/records/attributes, you should be able to have the expected output, see&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2019-11-22_13-48-31.png" style="width: 712px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8ES.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147328i6BA253F042CAF013/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8ES.png" alt="0683p000009M8ES.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2019-11-22_13-48-08.png" style="width: 741px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7um.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127973iC2C51F44920B3CE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7um.png" alt="0683p000009M7um.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope it helps you!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 07:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249869#M34272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-22T07:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a Loop XPath Query that will return both with records and without records on the child element?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249870#M34273</link>
      <description>&lt;P&gt;Thanks, Shong! Actually, that was an output of a tRESTClient.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What I did was to separate the pipes for both with different Xpath to get the desired output and just link both of their tHashOutputs.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 10:46:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-build-a-Loop-XPath-Query-that-will-return-both-with/m-p/2249870#M34273</guid>
      <dc:creator>jerownimow</dc:creator>
      <dc:date>2019-12-03T10:46:46Z</dc:date>
    </item>
  </channel>
</rss>

