<?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: Qlik Sense - Qlik Engine API - .NET SDK - Result too large in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112868#M19116</link>
    <description>&lt;P&gt;How many columns does your table have? For that code to achieve page sizes of 10k cells you would have to have at least 100. Which sounds like a lot...&lt;/P&gt;
&lt;P&gt;But you can certainly filter by column. If you set page with to a fixed number (like 10), then you can use the "Left" property of the NxPage instance to choose which set of columns to get. For instance, this call would get only columns 11 through 20:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;var allPages = pager.IteratePages(new[] { new NxPage { Width = 10, Left = 11, Height = 100 } }, Pager.Next).Select(pageSet =&amp;gt; pageSet.Single());&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2023 12:52:19 GMT</pubDate>
    <dc:creator>Øystein_Kolsrud</dc:creator>
    <dc:date>2023-09-04T12:52:19Z</dc:date>
    <item>
      <title>Qlik Sense - Qlik Engine API - .NET SDK - Result too large</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112010#M19104</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to get more than 10 columns of data from Qlik sense but it give me this error:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alessandrovernile_0-1693500025107.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115511i16D0E6499A34D3C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alessandrovernile_0-1693500025107.png" alt="alessandrovernile_0-1693500025107.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here's the main method to retrieve the data filtered by column based a user input&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;int startIndex = i * _noSqlInsertChunkSize;

// This method filter data by columns name input
var nxPages = GetQlikSensePagedQuery(columnInfo, dataColumns, startIndex, _noSqlInsertChunkSize);

// This is the method that gives the error
var dataPages = await wrappedObject.GetPagedDataAsync(nxPages);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the method to filter data by column name:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;private IEnumerable&amp;lt;NxPage&amp;gt; GetQlikSensePagedQuery(List&amp;lt;ColumnInfo&amp;gt; columnInfo, List&amp;lt;DataColumnCdto&amp;gt; dataColumns, int startIndex, int chunkSize)
        {
            var result = new List&amp;lt;NxPage&amp;gt;();

            for (int i = 0; i &amp;lt; columnInfo.Count(); i++)
            {
                var currentCI = columnInfo[i];
                if (dataColumns.Any(dc =&amp;gt; dc.PropertyName == currentCI.Name))
                {
                    result.Add(new NxPage { Top = startIndex, Height = chunkSize, Left = i, Width = 1 });
                }
            }
            return result;
        }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the method that gives the error:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;public async Task&amp;lt;IEnumerable&amp;lt;NxDataPage&amp;gt;&amp;gt; GetPagedDataAsync(IEnumerable&amp;lt;NxPage&amp;gt; nxPages)
{
            try
            {
                //this is the part that gives error
                return await _table.GetDataAsync(nxPages);
            }
            catch(MethodInvocationException e)
            {
                var details = e.InvocationError;
                switch (details.Code)
                {
                    case NxLocalizedErrorCode.LOCERR_HC_RESULT_TOO_LARGE:
                    throw new Exception("Qlik Sense doesn't support the number of columns used in the datasource. Please remove some of them.");
                }
                throw;
            }
        }&lt;/LI-CODE&gt;
&lt;P&gt;Is there a solution to solve this error?&lt;/P&gt;
&lt;P&gt;We use Qlik Sense .NET SDK 13.7.0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 16:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112010#M19104</guid>
      <dc:creator>alessandrovernile</dc:creator>
      <dc:date>2023-08-31T16:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Qlik Engine API - .NET SDK - Result too large</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112160#M19106</link>
      <description>&lt;P&gt;A page is not allowed to contain more than 10000 cells, and it sounds like you are running into that limit. So my recommendation is for you to check what the page size is, and if it is indeed larger than 10k cells, then implement some form of pagination to get the data in chunks!&lt;/P&gt;
&lt;P&gt;That's a rather old .NET SDK version you're on though. There are some convenient functions for doing pagination in newer versions of the library:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2023/Subsystems/NetSDKAPIref/Content/Qlik.Engine.DataPager.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/August2023/Subsystems/NetSDKAPIref/Content/Qlik.Engine.DataPager.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;That class for instance has this method that can be a convenient way to page through all data:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2023/Subsystems/NetSDKAPIref/Content/Qlik.Engine.DataPager.GetAllData.htm#Qlik_Engine_DataPager_GetAllData_System_Int32_" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/August2023/Subsystems/NetSDKAPIref/Content/Qlik.Engine.DataPager.GetAllData.htm#Qlik_Engine_DataPager_GetAllData_System_Int32_&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 07:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112160#M19106</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2023-09-01T07:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Qlik Engine API - .NET SDK - Result too large</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112808#M19113</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;I used this code to retrieve paginated results:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var o = application.GetGenericObject(objectsApp.Name);
var pager = o.GetAllHyperCubePagers().First();

var allPages = pager.IteratePages(new[] { new NxPage { Width = pager.NumberOfColumns, Height = 100 } }, Pager.Next).Select(pageSet =&amp;gt; pageSet.Single());
                               
var pages = allPages.SelectMany(page =&amp;gt; page.Matrix).ToList();&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Is there a way to retrieve already filtered data by column? Because using this api the whole table is returned to me.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 10:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112808#M19113</guid>
      <dc:creator>alessandrovernile</dc:creator>
      <dc:date>2023-09-04T10:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Qlik Engine API - .NET SDK - Result too large</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112868#M19116</link>
      <description>&lt;P&gt;How many columns does your table have? For that code to achieve page sizes of 10k cells you would have to have at least 100. Which sounds like a lot...&lt;/P&gt;
&lt;P&gt;But you can certainly filter by column. If you set page with to a fixed number (like 10), then you can use the "Left" property of the NxPage instance to choose which set of columns to get. For instance, this call would get only columns 11 through 20:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;var allPages = pager.IteratePages(new[] { new NxPage { Width = 10, Left = 11, Height = 100 } }, Pager.Next).Select(pageSet =&amp;gt; pageSet.Single());&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 12:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112868#M19116</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2023-09-04T12:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Qlik Engine API - .NET SDK - Result too large</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112881#M19119</link>
      <description>&lt;P&gt;Ok thanks,&lt;/P&gt;
&lt;P&gt;but is it possible to filter columns to retrieve by column name?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 13:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112881#M19119</guid>
      <dc:creator>alessandrovernile</dc:creator>
      <dc:date>2023-09-04T13:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Qlik Engine API - .NET SDK - Result too large</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112892#M19121</link>
      <description>&lt;P&gt;No, that is not something the engine API provides out of the box. You would have to figure out the column numbers based on the column names yourself, and then build your NxPage instances accordingly.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 13:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Qlik-Engine-API-NET-SDK-Result-too-large/m-p/2112892#M19121</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2023-09-04T13:31:16Z</dc:date>
    </item>
  </channel>
</rss>

