<?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 Cobra SDK - QueryError: Unable to process the query, result dataset is too big in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072139#M101</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to run a python script to do a query in apic database for class&amp;nbsp;l1PhysIf to obtain a port inventory, code seems to be ok, but when I execute code I get error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cobra.mit.request.QueryError: Unable to process the query, result dataset is too big&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my code I use a for loop for append query's obtained data to a empty list&lt;/P&gt;&lt;P&gt;my fabric has about 6900 ports so query results can be big, how can handle the code for obtain the data?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 07:33:47 GMT</pubDate>
    <dc:creator>Alberto Seg</dc:creator>
    <dc:date>2020-04-23T07:33:47Z</dc:date>
    <item>
      <title>Cobra SDK - QueryError: Unable to process the query, result dataset is too big</title>
      <link>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072139#M101</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to run a python script to do a query in apic database for class&amp;nbsp;l1PhysIf to obtain a port inventory, code seems to be ok, but when I execute code I get error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cobra.mit.request.QueryError: Unable to process the query, result dataset is too big&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my code I use a for loop for append query's obtained data to a empty list&lt;/P&gt;&lt;P&gt;my fabric has about 6900 ports so query results can be big, how can handle the code for obtain the data?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 07:33:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072139#M101</guid>
      <dc:creator>Alberto Seg</dc:creator>
      <dc:date>2020-04-23T07:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cobra SDK - QueryError: Unable to process the query, result dataset is too big</title>
      <link>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072163#M102</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/54827"&gt;@Alberto Seg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error you see is generated by APIC when the response data is too big. To lower the size of the return data, you need to use paging (I hope that is the correct wording).&lt;/P&gt;&lt;P&gt;I never set the page size in cobra, but it seems there are properties you can set: &lt;A href="https://cobra.readthedocs.io/en/latest/_modules/cobra/mit/request.html" target="_self"&gt;https://cobra.readthedocs.io/en/latest/_modules/cobra/mit/request.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  @property
    def pageSize(self):
        """Get the pageSize value.

        Returns:
          int: The number of results to be returned by a query.
        """
        return self.__options.get('page-size', None)

    @pageSize.setter
    def pageSize(self, pageSize):
        """Set the pageSize value.

        Args:
          pageSize (int): The number of results to be returned by a query.
        """
        try:
            numVal = int(pageSize)
        except:
            raise ValueError('{} pageSize needs to be an integer'.format(pageSize))
        self.__options['page-size'] = str(numVal)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergiu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 07:51:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072163#M102</guid>
      <dc:creator>Sergiu.Daniluk</dc:creator>
      <dc:date>2020-04-23T07:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cobra SDK - QueryError: Unable to process the query, result dataset is too big</title>
      <link>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072215#M103</link>
      <description>&lt;P&gt;Thanks, with this parameter I have been able to limit the query size and obtain results, but is curious because I would have to obtain 6972 results and if I don´t set the size query said is too big, however, If I set size to 7000 it´s return the complete results with 6972 values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 09:17:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cobra-sdk-queryerror-unable-to-process-the-query-result-dataset/m-p/4072215#M103</guid>
      <dc:creator>Alberto Seg</dc:creator>
      <dc:date>2020-04-23T09:17:59Z</dc:date>
    </item>
  </channel>
</rss>

