Hi,
I've never fully understood what happens when a layer with a definition query on it is shared from ArcGIS Pro 3.6.1 (Pro) to ArcGIS Online (AGOL) using Share As Web Layer. Is there a spot in AGOL to change that original definition query from Pro? It seems to be stuck in that specific filter with no option to change it.
In a recent workflow, I had a definition query on a layer of United States counties in Pro filtering 3 desired counties out of the 3,235. It was easier for me at the time to use the definition query instead of exporting the 3 selected counties as a separate feature class to bring in as another layer. After sharing the layer with the def query as a web layer to AGOL, only my 3 selected counties would show in the Data page of the hosted feature layer and when the feature layer was put in a map. Fantastic.
I ran the item report for my AGOL organization, and I saw that this feature layer that was only supposed to have 3 records had an unusually large feature storage size. I double checked the Data page, still only 3 records in the table. I checked the Visualization page in the Filter tab, no filters were on. I went into the ArcGIS REST Services Directory url for the feature layer to look for more information. On the bottom, in Supported Operations, there is a Get Estimates button which leads to a page that shows the count for the feature layer is 3,235 like the original county feature class.
To double check myself, I exported my 3 desired counties as its own feature class and shared it as a web layer from Pro to AGOL. The feature storage size was much smaller as expected and the count in Get Estimates was only 3.
Since the entire feature class ends up getting uploaded regardless of the definition query, is there a spot that I'm missing in AGOL to adjust the definition query/filter?
Thanks!