We are implementing a plugin datasource that pulls in data from a local sqlite database. Some of these datasets can be quite large (100K’s of elements for some layers) and it is possible for there to be quite a few Fields (e.g. a dozen or more).
We have the "IsQueryLanguageSupported" flag on the datasource template set to true, and we leverage the "whereclaue" property on the queryfilter to improve performance on data reads for the higher-volume cases.
Symbology is one of the most demanding/important cases, where data for many/all elements is frequently requested as the display renders. These Query requests tend to come in chunks of about 500 rows; we are extracting the ids (from the IN statement) to populate only the appropriate subset of rows. We’re getting reasonable performance with a few Fields, but degrades when there are more Fields.
Symbology tends to only be applied to 1 or 2 fields, so we’re hoping for a way to optimize display performance by only getting the data that is needed. SubFields looks to be exactly what we want:
https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Plugin-Datasources
If a SubFields clause is specified then only those values for fields listed in the QueryFilter.SubFields should be populated into the returned rows … values not specified in the SubFields clause should be set to null.
However, when a query on the datasource is triggered on rendering symbology set up around a single field, the "Subfields" property on the QueryFilter does not seem to ever provide additional context.
Questions:
Hi Benjamin,
- It seems like SubFields should be populated for the symbology cases. Is that an oversight (or are we missing something/misunderstanding)?
Are you saying that when you redraw the map, your implementation of PluginTableTemplate.Search(QueryFilter) gets called, and the QueryFilter.Subfields property is set to null?
--Rich
Sorry for the confusion - the subfields property is an empty string, when arcgis pro queries our plugin datasource for the sake of color coding.
So for example, if we set up symbology type of Graduated colors around a field in our plugin datasource "Population", it would make sense that the QueryFilter.Subfields property would refer to the "Population" attribute so we aren't getting more data than we need to for this, or similar use cases.
Is this possible?
Hope this is more clear,
thanks for the quick reply.
Ben
(Giving this one a nudge to get it back on the radar).
re: Are you saying that when you redraw the map, your implementation of PluginTableTemplate.Search(QueryFilter) gets called, and the QueryFilter.Subfields property is set to null?
Essentially -- SubFields is always "*" (all fields)
However (as mentioned in the original posting, it sounds like it should give us additional information for cases where it only needs a subset of the data)
https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Plugin-Datasources
If a SubFields clause is specified then only those values for fields listed in the QueryFilter.SubFields should be populated into the returned rows … values not specified in the SubFields clause should be set to null.
But we've reviewed quite a few difference cases, and we've never seen SubFields return anything other than "*".
We would expect (and really hope) that SubFields would be provided for Symbology cases. Do you know what cases SubFields would be specified (and why it is not provided for symbology cases)?
Thanks!
Rob.
We're investigating this behavior.
--Rich
Hi Rich,
Just checking in - any update on this one?
Thank you,
Rob.
We haven't looked at it yet, but we're scheduled to investigate during the Pro 2.7 release cycle (now through fall).
--Rich
Thank you Rich - appreciate it.
This is fixed in the just-released ArcGIS Pro 2.7 release.