<?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: Support Distinct : false ? how to enable in map service ? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679598#M25886</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mayur,&lt;/P&gt;&lt;P&gt;Yes, that is expected. When feature-classes/tables participating in a join come from different workspaces, supportsAdvancedQueries is set to false and a query operation can't return distinct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is done this way for best performance - map service delegates works to the underlying database for queries such as distinct, out statistics etc. When tables are coming from two different databases, this approach does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the REST API doc: &lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/layer-table.htm" title="https://developers.arcgis.com/rest/services-reference/layer-table.htm"&gt;https://developers.arcgis.com/rest/services-reference/layer-table.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN class=""&gt;supportsAdvancedQueries&lt;/SPAN&gt; would return false in the following scenarios:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The layer / table resides in a workspace other than an enterprise database or File Geodatabase.&lt;/LI&gt;&lt;LI&gt;The layer / table is joined with another layer / table from a different workspace.&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only resolution that I can think for your problem is to, if possible, bring both Parcel and the view in to one database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Tanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Dec 2019 16:53:33 GMT</pubDate>
    <dc:creator>TanuHoque</dc:creator>
    <dc:date>2019-12-13T16:53:33Z</dc:date>
    <item>
      <title>Support Distinct : false ? how to enable in map service ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679593#M25881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I published map service on ArcGIS Server 10.3.1, I see in Advanced Query Capabilities section "&lt;STRONG&gt;Supports Distinct : false" &lt;/STRONG&gt;in rest directory, When I try to query using Query with&amp;nbsp;query.returnDistinctValues = true; parameter, It doesn't return unique values from the layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/475642_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I don't see option in capabilities while you publish map service on ArcGIS Server.&lt;/P&gt;&lt;P&gt;How to enable&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;Supports Distinct : true"&lt;SPAN&gt;&amp;nbsp; ?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Am I missing anything ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 06:08:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679593#M25881</guid>
      <dc:creator>MayurDodiya</dc:creator>
      <dc:date>2019-12-09T06:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Support Distinct : false ? how to enable in map service ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679594#M25882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A href="https://community.esri.com/migrated-users/4720"&gt;Mayur Dodiya&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the map service support 'supportsAdvancedQueries: true'? What is the data source for the map service?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 16:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679594#M25882</guid>
      <dc:creator>ThomasJones1</dc:creator>
      <dc:date>2019-12-09T16:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Support Distinct : false ? how to enable in map service ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679595#M25883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Support Advanced Queries : false&lt;/STRONG&gt; in rest directory. The Data Source is ArcGIS Enterprise Geodatabase Oracle 11g.&lt;/P&gt;&lt;P&gt;Layer "&lt;STRONG&gt;Parcel&lt;/STRONG&gt;" is join with "View&amp;nbsp;" based on "&lt;STRONG&gt;PIN"&lt;/STRONG&gt; field and published on ArcGIS Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/475802_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679595#M25883</guid>
      <dc:creator>MayurDodiya</dc:creator>
      <dc:date>2019-12-10T10:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Support Distinct : false ? how to enable in map service ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679596#M25884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4720"&gt;Mayur Dodiya&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;How to enable&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;Supports Distinct : true"&lt;SPAN&gt;&amp;nbsp; ?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can't do that. A map or feature service figures that out based on whether the underlying datasource supports this.&lt;/P&gt;&lt;P&gt;I guess it is the join that is throwing it off. Are the Parcel layer and the view coming from the same workspace - with that I mean did you use the same connection (.sde) file to add both of them in the map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they are coming from the same worksapce, then I think it could be a bug and please reach out to Esri Support to open a ticket for this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 20:15:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679596#M25884</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2019-12-10T20:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Support Distinct : false ? how to enable in map service ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679597#M25885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tanu,&lt;/P&gt;&lt;P&gt;They are coming from different worskspace, Parcel layer from Geodatabase enterprise Oracle 11g and View from SQL Server (Non-Spatial) database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 10:43:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679597#M25885</guid>
      <dc:creator>MayurDodiya</dc:creator>
      <dc:date>2019-12-13T10:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Support Distinct : false ? how to enable in map service ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679598#M25886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mayur,&lt;/P&gt;&lt;P&gt;Yes, that is expected. When feature-classes/tables participating in a join come from different workspaces, supportsAdvancedQueries is set to false and a query operation can't return distinct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is done this way for best performance - map service delegates works to the underlying database for queries such as distinct, out statistics etc. When tables are coming from two different databases, this approach does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the REST API doc: &lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/layer-table.htm" title="https://developers.arcgis.com/rest/services-reference/layer-table.htm"&gt;https://developers.arcgis.com/rest/services-reference/layer-table.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN class=""&gt;supportsAdvancedQueries&lt;/SPAN&gt; would return false in the following scenarios:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The layer / table resides in a workspace other than an enterprise database or File Geodatabase.&lt;/LI&gt;&lt;LI&gt;The layer / table is joined with another layer / table from a different workspace.&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only resolution that I can think for your problem is to, if possible, bring both Parcel and the view in to one database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Tanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 16:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/support-distinct-false-how-to-enable-in-map/m-p/679598#M25886</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2019-12-13T16:53:33Z</dc:date>
    </item>
  </channel>
</rss>

