Select to view content in your preferred language

Views are not supported in ArcGIS Server feature services(?)

3510
6
Jump to solution
09-21-2021 09:11 AM
RyanDavis1
Regular Contributor

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

0 Kudos
1 Solution

Accepted Solutions
Borch
by
Occasional Contributor

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

View solution in original post

6 Replies
Borch
by
Occasional Contributor

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

RyanDavis1
Regular Contributor

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.

0 Kudos
Borch
by
Occasional Contributor

Hi @RyanDavis1 ,

So, disabling all editing capabilities from Configuration Tab in the Share as Web Layer tool will do the trick.

Borch_3-1632471243067.png

Borch_1-1632470979847.png

Borch_0-1632470756543.png

Borch_2-1632471118332.png

 

 

0 Kudos
NathanEnge
Esri Contributor

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...

RyanDavis1
Regular Contributor

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.

0 Kudos
George_Thompson
Esri Notable Contributor

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.

--- George T.
0 Kudos