<?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 Class break render in QueryTableDataSource in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/class-break-render-in-querytabledatasource/m-p/532911#M49676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are using API 4.14 and we are trying join a layer published on the server with a large table on SQL, using QueryTableDataSource and MapImageLayer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once created the MapImageLayer we try to create a class breaks renderer on a field joined from the SQL table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The join looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"source":{"dataSource":{"leftTableSource":{"mapLayerId":0,"type":"mapLayer"},"rightTableSource":{"dataSource":{"workspaceId":"test_DB","query":"SELECT SUM(FIELD_1) FIELD_1, FIELD_2 FROM TABLE WHERE &lt;STRONG&gt;QUERY&lt;/STRONG&gt; GROUP BY FIELD_2 ","oidFields":" FIELD_2 ","type":"queryTable"},"type":"dataLayer"},"leftTableKey":"FIELD_3","rightTableKey":"FIELD_2","joinType":"esriLeftOuterJoin","type":"joinTable"},"type":"dataLayer"}}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields returned from the SQL table looks like this:&amp;nbsp;&lt;EM style="background: yellow; font-size: 11.0pt; "&gt;sde.testDB.%0827c0da_57d2_4f98_8bc6_cb02da63a56c.FIELD_NAME&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background: yellow; font-size: 11.0pt; "&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So when we apply the class break renderer the classification definition looks like this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"type":"classBreaksDef","breakCount":5,"classificationField":"&lt;SPAN style="background: yellow;"&gt;sde.testDB.%0827c0da_57d2_4f98_8bc6_cb02da63a56c&lt;/SPAN&gt;.FIELD_1","classificationMethod":"esriClassifyQuantile"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine until many queries are executed at the same time. In that case it throws the following error:&amp;nbsp;&lt;STRONG style="color: red; font-size: 11.0pt; "&gt;Unable to find 'classificationField'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We noticed that if we try to create this renderer from the REST endpoint deleting the first part of the field name (&lt;EM style="background: yellow; font-size: 11.0pt; "&gt;sde.testDB.%0827c0da_57d2_4f98_8bc6_cb02da63a56c)&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&amp;nbsp;also if we try several times the query never fails.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this way the classification definition would look like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;EM&gt;{"type":"classBreaksDef","breakCount":5,"classificationField":"FIELD_1","classificationMethod":"esriClassifyQuantile"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But from Javascript you can't omit that part, otherwise it will throw the following error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI style="color: #212121;"&gt;&lt;SPAN style="font-size: 9.0pt; color: #881391;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #c41a16;"&gt;color-class-breaks-renderer:invalid-parameters&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: #212121;"&gt;&lt;SPAN style="font-size: 9.0pt; color: #881391;"&gt;message&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #c41a16;"&gt;Unknown fields: FIELD_1. You can only use fields defined in the layer schema&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone ever tried this flow?&lt;/P&gt;&lt;P&gt;I think that if from the Javascript code we could get rid of that prefix from the field name it would work perfectly fine, as it works on the REST side.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any suggestion?&lt;/P&gt;&lt;P&gt;&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;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Feb 2020 11:42:15 GMT</pubDate>
    <dc:creator>StefanoAngarano1</dc:creator>
    <dc:date>2020-02-08T11:42:15Z</dc:date>
    <item>
      <title>Class break render in QueryTableDataSource</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/class-break-render-in-querytabledatasource/m-p/532911#M49676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are using API 4.14 and we are trying join a layer published on the server with a large table on SQL, using QueryTableDataSource and MapImageLayer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once created the MapImageLayer we try to create a class breaks renderer on a field joined from the SQL table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The join looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"source":{"dataSource":{"leftTableSource":{"mapLayerId":0,"type":"mapLayer"},"rightTableSource":{"dataSource":{"workspaceId":"test_DB","query":"SELECT SUM(FIELD_1) FIELD_1, FIELD_2 FROM TABLE WHERE &lt;STRONG&gt;QUERY&lt;/STRONG&gt; GROUP BY FIELD_2 ","oidFields":" FIELD_2 ","type":"queryTable"},"type":"dataLayer"},"leftTableKey":"FIELD_3","rightTableKey":"FIELD_2","joinType":"esriLeftOuterJoin","type":"joinTable"},"type":"dataLayer"}}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields returned from the SQL table looks like this:&amp;nbsp;&lt;EM style="background: yellow; font-size: 11.0pt; "&gt;sde.testDB.%0827c0da_57d2_4f98_8bc6_cb02da63a56c.FIELD_NAME&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background: yellow; font-size: 11.0pt; "&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So when we apply the class break renderer the classification definition looks like this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"type":"classBreaksDef","breakCount":5,"classificationField":"&lt;SPAN style="background: yellow;"&gt;sde.testDB.%0827c0da_57d2_4f98_8bc6_cb02da63a56c&lt;/SPAN&gt;.FIELD_1","classificationMethod":"esriClassifyQuantile"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine until many queries are executed at the same time. In that case it throws the following error:&amp;nbsp;&lt;STRONG style="color: red; font-size: 11.0pt; "&gt;Unable to find 'classificationField'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We noticed that if we try to create this renderer from the REST endpoint deleting the first part of the field name (&lt;EM style="background: yellow; font-size: 11.0pt; "&gt;sde.testDB.%0827c0da_57d2_4f98_8bc6_cb02da63a56c)&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&amp;nbsp;also if we try several times the query never fails.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this way the classification definition would look like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;EM&gt;{"type":"classBreaksDef","breakCount":5,"classificationField":"FIELD_1","classificationMethod":"esriClassifyQuantile"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But from Javascript you can't omit that part, otherwise it will throw the following error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI style="color: #212121;"&gt;&lt;SPAN style="font-size: 9.0pt; color: #881391;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #c41a16;"&gt;color-class-breaks-renderer:invalid-parameters&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: #212121;"&gt;&lt;SPAN style="font-size: 9.0pt; color: #881391;"&gt;message&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #c41a16;"&gt;Unknown fields: FIELD_1. You can only use fields defined in the layer schema&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;"&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone ever tried this flow?&lt;/P&gt;&lt;P&gt;I think that if from the Javascript code we could get rid of that prefix from the field name it would work perfectly fine, as it works on the REST side.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any suggestion?&lt;/P&gt;&lt;P&gt;&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;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Feb 2020 11:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/class-break-render-in-querytabledatasource/m-p/532911#M49676</guid>
      <dc:creator>StefanoAngarano1</dc:creator>
      <dc:date>2020-02-08T11:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Class break render in QueryTableDataSource</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/class-break-render-in-querytabledatasource/m-p/532912#M49677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefano,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like you are hitting a server side bug.&lt;/P&gt;&lt;P&gt;Having said that, it looks like you can still achieve this a bit (might be better in some sense) different approach.&lt;/P&gt;&lt;P&gt;Please see the blog post here: &lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/dynamic-spatiotemporal-exploratory-analysis-with-aggregated-results-using-time-series-data-in-arcgis/" title="https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/dynamic-spatiotemporal-exploratory-analysis-with-aggregated-results-using-time-series-data-in-arcgis/"&gt;Dynamic Spatiotemporal Exploratory Analysis with Aggregated Results Using Time Series Data in ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you find this new approach is not going to help you much.&lt;/P&gt;&lt;P&gt;&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>Wed, 04 Mar 2020 03:57:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/class-break-render-in-querytabledatasource/m-p/532912#M49677</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2020-03-04T03:57:04Z</dc:date>
    </item>
  </channel>
</rss>

