I can't bring a database view created using ArcGIS Desktop v10.3.1 via ArcCatalog into ArcGIS Pro. I've tried previewing the View in Catalog as well as adding it to a map in ArcGIS Pro. In both cases, it says,"Failed to add data." in Add data message window.
The View is stored in an enterprise geodatabase (10.3.1) with SQL server. Again I have no problem bringing it in to ArcGIS Desktop applications, but ArcGIS Pro 2.1 ain't havin' it.
Any ideas?
1. If you are able to add this view to ArcMap without any error, but on the same desktop computer you are unable to add that view to ArcGIS Pro, please call Esri Support so they can review the details of the view and why ArcGIS Pro seems to throw an exception while in the same environment ArcDesktop works fine.
2. For now, what is your view SQL definition? Is it based on multiple tables? Does it include a spatial column, etc.?
3. Are you able to create a very simple view (select * from a single table) and add that view into Pro? If yes, then there is most likely something in the SQL Definition that Pro does not like for one reason or another. If you can add a simple select * from a single table view to Pro, then incrementally add complexity to your test views SQL definition. At some point you will see the error again. Once you do, you can use that information to deduce where the root cause is.
So, I did some more research and ran across this Bug report:
BUG-000107137: "Error: Failed to Add Data" is encountered when addi..
It's not exactly the same issue I'm having, but the work around suggested for this bug was to add a Query Layer. I thought, OK, my view is essentially a stored Query Layer, so I'll try to add a Query Layer to get the data to appear in the map.
So, went through the process to add Query Layer to the map. I chose my exsiting SDE database connection, then double clicked on the particular view that was listed in the contents. The SQL statement appeared in the box. Finally, I added a name for my Query Layer and clicked on the Validated button. The SQL query validated and the data appeared in the map as expected. So, the work around worked. It's annoying, but it worked.
I'm sorry you encountered that issue. Great work researching and testing though!
The add query layer work-around worked for me as well, but we use Oracle, not SQL Server as listed in the bug report. And I agree, it's a bit annoying. We have been dragging these same 'spatial views' from ArcCatalog into ArcMap for the last 12+ years with no problems. If it works in ArcMap, why can't it work in Pro? ESRI, please look into making this easier for us.
We have found that in ArcGIS Pro 2.8.1, we were able to add all of our spatial views to a map just like normal by dragging in or using Add Data, but the ones that had been created using SDE command line (as opposed to being created within ArcGIS desktop) would just be identified as "query layers" in the Source tab. But now, in ArcGIS Pro 2.9.1, we are unable to add the command line-created SVs to a map by dragging or using add data. It just fails. (workarounds are that you can use the Add Data / Query Layer option, or you can add to ArcMap, then import that to ArcGIS Pro). other than that, it appears we will have to recreate all of our older spatial views if we want to use them in ArcGIS pro.
Just to confirm, we did verify that registering spatial views using ArcCatalog or ArcGIS Pro made them once again usable in ArcGIS Pro 2.9.1. We are in the process of updating all of our spatial views that had previously been registered using SDE Command Line tools. An additional benefit to this is that once they are registered using ArcCatalog or ArcPro, they can now support ArcGIS metadata, whereas the command line-created ones didn't.
I don't have a cause of the issue as there doesn't appear to be an existing BUG logged but I thought I would just mention the result of a Tech Support case I have been involved in.
The customer had the following installed and was seeing the same "Failed to add data" when adding sde views:
The resolution has been to upgrade ArcGIS Pro to 2.9.5.
Thanks
Thank you for that info, Richard... I did have a case on this (03080113) in which the conclusion was basically that this was by design and that the only fix was to recreate and register all of our spatial views that were previously registered using SDE command line, so unfortunately agency-wide, we have spent a lot of time doing that only to now find out that it was fixed a couple of patches later, with no bug logged. I am happy it is fixed, but pretty annoyed.