<?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 get Count from ArcGisProQuery without loading all data in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089405#M7037</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we are working with ArcGisProQuery. I am wondering if there is a way to get just the count instead the full result. Its because we want do pretend the user from loading too much data and want to evaluate how many items would be loaded by a previously constructed query.&lt;/P&gt;&lt;P&gt;The query constructions may contain some where-clauses like a spatialfilter intersect or just some date-comparison.&lt;/P&gt;&lt;P&gt;Basically we are using the queries as follows:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ArcGisProQuery sdeQuery = [...];
var filter = sdeQuery.ToQuery(shapeFieldName, featureClass);
RowCursor cursor = featureClass.Search(filter);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to change the given select-fields from the subfields-property by a hard coded "Count(*)" but I am getting an error about quota. Thats weird because loading the data including shape fields works fine.&lt;/P&gt;&lt;P&gt;Hopefully someone has an idea.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 20:01:57 GMT</pubDate>
    <dc:creator>SebastianKrings</dc:creator>
    <dc:date>2021-08-16T20:01:57Z</dc:date>
    <item>
      <title>How to get Count from ArcGisProQuery without loading all data</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089405#M7037</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we are working with ArcGisProQuery. I am wondering if there is a way to get just the count instead the full result. Its because we want do pretend the user from loading too much data and want to evaluate how many items would be loaded by a previously constructed query.&lt;/P&gt;&lt;P&gt;The query constructions may contain some where-clauses like a spatialfilter intersect or just some date-comparison.&lt;/P&gt;&lt;P&gt;Basically we are using the queries as follows:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ArcGisProQuery sdeQuery = [...];
var filter = sdeQuery.ToQuery(shapeFieldName, featureClass);
RowCursor cursor = featureClass.Search(filter);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to change the given select-fields from the subfields-property by a hard coded "Count(*)" but I am getting an error about quota. Thats weird because loading the data including shape fields works fine.&lt;/P&gt;&lt;P&gt;Hopefully someone has an idea.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:01:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089405#M7037</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2021-08-16T20:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Count from ArcGisProQuery without loading all data</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089420#M7038</link>
      <description>&lt;P&gt;I'm not familiar with ArcGisProQuery.&lt;/P&gt;&lt;P&gt;If you want to use the Pro SDK, I would take a look at &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic19997.html" target="_blank" rel="noopener"&gt;Table.CalculateStatistics&lt;/A&gt;. &amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geodatabase#calculating-statistics" target="_blank" rel="noopener"&gt;Here are some docs that walk through how to use this method&lt;/A&gt;. &amp;nbsp;For your example, you would set the TableStatistics.QueryFilter to the query, and then create a single StatisticsDescription that uses the Count as the StatisticsFunction.&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:26:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089420#M7038</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2021-08-16T20:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Count from ArcGisProQuery without loading all data</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089545#M7040</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;As far as I see you solution it only works on a single table (table.CalculateStatistics). Where on the StatisticsResult I could work with.&lt;/P&gt;&lt;P&gt;Our Queries, which are translated into a ArcGis QueryDef-object, may contain joins over multiple tables.&lt;BR /&gt;But I did not found something similar to "&lt;SPAN&gt;TableStatistics.QueryFilter&lt;/SPAN&gt;" where I just could pass my join query.&lt;BR /&gt;&lt;BR /&gt;I am wondering because in the UI of ArcGisPro you can also define queries, very similar to the programmatically way we are doin. And there it is possible to check an option "counts only". I would like to achieve that too.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 10:33:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1089545#M7040</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2021-08-17T10:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Count from ArcGisProQuery without loading all data</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1090197#M7047</link>
      <description>&lt;P&gt;Sebastian,&lt;/P&gt;&lt;P&gt;I haven't had time to test this, but have you tried creating a QueryTable?&lt;/P&gt;&lt;P&gt;You create a QueryTable using the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic14519.html" target="_self"&gt;Geodatabase.OpenQueryTable&lt;/A&gt; method. This routine takes a QueryTableDescription object, which is built around a QueryDef. &amp;nbsp;The routines&amp;nbsp;returns a&amp;nbsp;&lt;EM&gt;Table&lt;/EM&gt; that you might be able to use with Table.CalculateStatistics.&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 23:35:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1090197#M7047</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2021-08-18T23:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Count from ArcGisProQuery without loading all data</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1091028#M7059</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Unfortunately I cannot track this issue any more. I forwarded your information.&lt;BR /&gt;Due to that I mark your answer as solution.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 07:33:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-count-from-arcgisproquery-without/m-p/1091028#M7059</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2021-08-21T07:33:19Z</dc:date>
    </item>
  </channel>
</rss>

