Hello,
According to this page, "[v]iews are not supported in ArcGIS Server feature services". Can anyone shed light on what exactly this means?
We use SQL Server views all the time for feature services and have done so for many years. Does this lack of support simply mean we can't create tech support tickets, or does it mean that it's a really poor practice? If using views, are we limited in capabilities in maps and apps?
Thanks,
Ryan
Solved! Go to Solution.
Dear RyanDavis1,
It is correct, you cannot publish a view in a Feature Service but you can use Map Service instead.
From the official documentation:
Layers that are based on views are not supported in feature services. You cannot edit views using ArcGIS clients; therefore, publishing feature services containing views is not supported, as feature services can be enabled for editing. To use data from a view for reference in a map or app, publish the view in a map service.
Prepare data to publish a feature service—ArcGIS Server | Documentation for ArcGIS Enterprise
Best
Borja
Dear RyanDavis1,
It is correct, you cannot publish a view in a Feature Service but you can use Map Service instead.
From the official documentation:
Layers that are based on views are not supported in feature services. You cannot edit views using ArcGIS clients; therefore, publishing feature services containing views is not supported, as feature services can be enabled for editing. To use data from a view for reference in a map or app, publish the view in a map service.
Prepare data to publish a feature service—ArcGIS Server | Documentation for ArcGIS Enterprise
Best
Borja
Thank you for the reply @Borch. I think your answer is mostly correct, but we clearly can publish SQL Server views as feature services because we have routinely done so for years. Regardless, I think the documentation you quote explains what Esri really means is that they don't support editable feature services.
Hi @RyanDavis1 ,
So, disabling all editing capabilities from Configuration Tab in the Share as Web Layer tool will do the trick.
late to the game, but to add to this, Query Layers in ArcGIS Pro would be the supported method for writing T-SQL to create views in the EGDB. It can also be published and consumed like a traditional feature layer.
See blog post on how Query Layer is used in ArcGIS Dashboards: https://www.esri.com/arcgis-blog/products/ops-dashboard/data-management/using-query-layers-in-dashbo...
Thanks for the reply @NathanEnge . I just tested this out, and it looks like if I want to persist the query layer I have to export it to the SQL Server database. That saves it as a new table not as a view so we're still looking at redundant data. We generally prefer views so we don't have to repeat geometry over and over.
I suppose it's a "view" that can be saved with my .aprx, but as far as I can tell it's not saved anywhere else.
Query layers only persist in the map (.aprx).
If you need it to persist for others, then I would created a DB view to share. This would help with the redundant data mention above.