When Walking an Oracle 11g Enterprise Geodatabase, is there a way to tell if the table or feature class you're on is actually a view? I was hoping that the canVersion dataset describe property would work, but apparently ArcGIS still thinks some views can be registered as versioned.
I did stumble across this SQL to find all the views in the (Oracle) database.
select owner||'.'||object_name as view_name
where object_type = 'VIEW'
I suppose I could just run that with arcpy.ArcSDESQLExecute() and then check if each object being walked is in the SQL result. Still interested in other options though.
arcpy.Describe.canVersion() is returning True for some of your views? I can't say I tested all of our views, but I tested a random sampling across half a dozen enterprise geodatabases, and it always returned False. I wonder under what conditions canVersion() returns True for a database view.
Thanks for the comment, Joshua. I dug a little deeper and found that about one third of our views describe as canVersion True. I checked the sde.table_registry and all of those are also registered. None of the ones that describe as canVersion False are registered in sde.table_registry. Most of these views are very old and were created (before my time) with sde comand lines so I guess that makes sense. Maybe it's time to recreate all of these views with the right click option in ArcCatalog.
Yes, one of the downsides of continual and long upgrade paths, i.e., not all of the former functionality plays nice in the upgraded environment. My guess is that you are correct, and that only views registered with the old SDE command line tools show up as version-able. Recreating them might take a little time upfront, but having consistency in your environments has a lot of value.