How to Edit a Query Layer

1042
8
07-04-2019 01:40 PM
NareshNagandla
New Contributor II

HI,

I have created a Query Layer which queries against my Oracle Database. I am only able to view the data but I cannot edit the data directly in ArcGIS PRO 2.3. When I click on EDIT tab in ArcGIS and click the point, it disables the Modify  or Delete and I cannot make any changes. 

When creating the connection to database, I have used a user which has both Read and Write permissions.

Can Someone please let me know what I am doing wrong here??

0 Kudos
8 Replies
JonathanFarmer2
Occasional Contributor III

Hi Naresh,

Is this just a simple query to 1 underlying table? 

If I do a "select * from table" and use that to create a new query layer, I can modify and delete features in Pro. But if you are doing a more complex query with a join or other behavior, that could be playing a role here.

Can you include the query you are using? How are you creating the query layer?

Jonathan

0 Kudos
NareshNagandla
New Contributor II

I am using a simple select query only.

select * from STRUCTURE where deleted = 'N' 

0 Kudos
JonathanFarmer2
Occasional Contributor III

Can you try going through this workflow to create the query layer and see if it lets you edit? I just tried your exact query here and it works fine for me. Are you using Pro 2.3.3 or 2.3.0?

https://pro.arcgis.com/en/pro-app/help/data/query-layers/creating-a-query-layer.htm

0 Kudos
NareshNagandla
New Contributor II

I am using ArcGIS Pro 2.3.0 

Created a QueryLayer 

On selecting a particular attribute on Map and select Edit Ribbon and Click Modify and then select Move

I am unable to move the point to a different Coordinate:

Where as on a File Geodatabase, I can Modify and click Move and Change the Co-ordinates.

Only on an Query Layer which was connected to enterprise GeoDatabase, I am unable to do it.

0 Kudos
JonathanFarmer2
Occasional Contributor III

Naresh,

So one of the things that bugged me about this issue is that you really shouldn't be able to edit query layers. They are simply SQL statements of tables in the geodatabase and we really should be editing the underlying table itself. Query layers can be used as inputs to GP tools or accessed via developer API's but not edited in the traditional sense.

I think the edit options not being greyed out on my end is actually the issue here and not the issue you are seeing. While the edit options in Pro for me are "live", if I actually try to move or delete a feature it errors out as I would expect to see. Sorry I didn't actually test this earlier, I got caught up in whether the edit options were live or not live and lost sight of the core issue here.

I'd recommend contacting Support so we can create a case on this and investigate further. But your inability to edit the query layer from an enterprise geodatabase is what should be expected here per my understanding.

Jonathan

0 Kudos
NareshNagandla
New Contributor II

Thanks!!  Do you know if its the same issue even when we "Register the Database"  Is it all just Read only option and not Write mode??

0 Kudos
JonathanFarmer2
Occasional Contributor III

It should still behave the same way regardless as long as it is a query layer. 

0 Kudos
NatalieM_Runyan
New Contributor III

Hi Naresh, did you ultimately discover a way to edit via a query layer?  for years we have published read-only services of our non-SDE/RDBMS data, even as feature services for taking into offline workflows. However, we've never actually attempted to edit the records from the GIS side.  We'd like to do that now, just for attributes not the geometry field.  I can understand that the geometry would not be editable because that is what is used to create the query layer in the first place (it would be a circular logic problem I think).  I'm thinking maybe we could use an "update" statement instead of a "select" to actually create the query layer?

0 Kudos