According to the ArcGIS Enerprise documentation (Prepare data to publish a feature service—ArcGIS Server | Documentation for ArcGIS Enterprise) it is not currently supported to use ArcGIS Pro to publish a query layers that contains virtual columns, where clauses, or joins.
Query layers provide lots of flexibility to how we structure our databases and can help reduce the need for maintaining duplicate data. For example, there is an address point layer with address related attributes but we also have a table with information about waste collection that references address ids. If publishing the query layer with a join were possible then we could use a query layer to join the waste collection attributes onto the address point geometry, and display that in ArcGIS Enterprise. Without this feature we need to resort to using another tool to sync maintain a new layer that contains address point geometry and the waste collection attributes.
Providing the ability to publish query layers with where statements and joins gives the user much more flexibility in how they can manage and serve their data.
Have you tried publishing a map service? Are you aware that map services should support these types of query layers?
Thanks,
Jonah
Hi @JonahLay ,
I didn't realize that a query layer would work with a map service. That is good to know. I'm not sure on the exact differences between map services and feature services, but I thought that a map service couldn't be queried / perform a select by location operation on, which is part of the functionality I need.
For the time being I've got around the issue by using arcade in the popups to essentially perform the query by filtering feature. This got me most of the needed functionality.
----------------------------------------------
Edit: I tried publishing the query layer (with joins and where clause) as a map service but I run into the same issue where the data loads in the table of a Map Viewer but the geometry is never displayed on the map. So using a map service does not appear to be a viable workaround.
Thanks @JonahLay for pointing that out.
Yes, you can submit query requests to layers off a map service. Map service and Feature Service query operations are identical with a few exceptions due to the nature of these two service types.
In short, you can do everything with map services that you can do with feature services. There are of course some exceptions on both sides - e.g. for your workflow with query layers, joins etc. you need to use map services; whereas for editing workflow, then you must use feature service.
There are two ways you can visualize data from a map service:
whether you add them as a map image layer or feature layer; you should get all functionality working - query, popup, filtering, update renderer etc. should work.
Now back to the query layer issue, it should just work. It is odd that it is not working for you. If your service is public, can you pls share the url, and I can take a look. Otherwise please reach out to the support and we should be able to help you out.
We have a sample map service with query layers running here that you can play with: https://sampleserver6.arcgisonline.com/arcgis/rest/services/SpatioTemporalAggregation/RainfallTimeSe...
This service allows you to perform dynamic aggregation of rainfall data based on the time-window and display them on the map. Please give this a try.
For more info, please see these links:
pls let me know if you have any questions
Thanks
Tanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.