How to Edit a Query Layer

431
7
07-04-2019 01:40 PM
Highlighted
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??

Reply
0 Kudos
7 Replies
Highlighted
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

Reply
0 Kudos
Highlighted
New Contributor II

I am using a simple select query only.

select * from STRUCTURE where deleted = 'N' 

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
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??

Reply
0 Kudos
Highlighted
Occasional Contributor III

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

Reply
0 Kudos