2

Currently I am writing a python script that creates a feature layer from our parcel fabric and then appends that data into a different SDE feature class. The problem is that when executing arcpy.MakeFeatureLayer the 000732 error is returned; dataset does not exist or is not supported. I know the path to the fabric data is valid. The fabric data can be accessed manually using that connection without trouble. I also have a model for this type of process that uses the Make Feature Layer tool and uses the same SDE connection file which works without trouble. I have found an abundance of information about this error online, but none of the suggested fixes seem to resolve my issue.

The code I am using is as follows:

    import arcpy
    parcels = r"\\networkMachineName\folder\projects\lgim\fabric.sde\fabric.DBO.ParcelEditing\fabric.DBO.ParcelFabric\fabric.DBO.ParcelFabric_Parcels"
    layer = "parcelLyr"
    whereClause = "SystemEndDate is null and Type = 7"
    arcpy.MakeFeatureLayer_management(parcels, layer, whereClause, "", "")

The parcel data from the fabric that is being input to the tool does not have any subtypes.

In the same network drive location I have other SDE connection files to different SDE geodatabases on the same server. These connection files have been used as inputs to arcpy.MakeFeatureLayer using the same raw string convention with no trouble. I only receive the 000732 error from the fabric SDE connection. The only difference that I can see between the connections is that the other SDE geodatabases are SDE owner, but the fabric SDE geodatabase is DBO owner. All of the connection files reference a user with full select, insert, update, delete privileges.

The ParcelEditing dataset is registered as versioned.

The error occurs in stand alone python script and in the ArcMap interactive python window.

When the model is first opened from ArcToolbox, the path to the fabric data shows the same error, but if the user browses to the data again the error is resolved and the model executes successfully.

Because the parcel fabric is a somewhat complex data type, I also attempted to execute arcpy.MakeParcelFabricLayer using the same connection file, but it failed with the same 000732 error.

We are using ArcGIS 10.2.2 for desktop, geodatabases, and fabric. The RDBMS is SQL Server 2012.

I feel like this should be a straightforward task in python, but cannot figure out what is going wrong for some reason. I am hoping that someone here can point me in the right direction.

  • The last two arguments for MakeFeatureLayer are legacy and can be removed. Can this be done in modelbuilder? If so then export as python script and see what that says. I suspect your path to parcels is incorrect. – Michael Stimson Feb 18 '15 at 0:42
  • This does work in ModelBuilder. I exported the model to script as you suggested, and the exported script gave a slightly different path. Instead of the path shown above, the path was "N:\\projects\\lgim\\fabric.sde\\fabric.DBO.ParcelEditing\\fabric.DBO.ParcelFabric_Parcels" ModelBuilder left out the fabric.DBO.ParcelFabric and went straight the parcels. N: is just the drive letter assigned to the above network drive and folder by my machine. Anyway, I changed the parcels variable to the model path and tried MakeFeatureLayer again. The process failed with the same 000732 error. @Michael – KatM Feb 18 '15 at 1:33
  • And of course the 'help' is very helpful support.esri.com/es/knowledgebase/techarticles/detail/35151 do you need to enter credentials (username, password..) for that SDE connection? Perhaps it's skipping that step and returning not valid where it should be returning unknown username or password. Have you tested the script that was exported from modelbuilder? Did that work or return an error too? – Michael Stimson Feb 18 '15 at 2:19
  • The script from the model failed, same error. The SDE connection stores the credentials, so I don't think that would be causing a problem. However, this did lead me to think about what permissions the user had with the DBMS. I had my supervisor add the connection user to a role with dbowner privileges. MakeFeatureLayer still failed with 000732, but MakeParcelFabricLayer did work, and I was able to use that layer as an input successfully. I didn't technically answer the question, but I did resolve my problem. Do I mark this as answered? This is my first post here. Thanks! @Michael – KatM Feb 18 '15 at 20:40
  • Answer your own question (there's a button for that)... an answer with your own personal experience, and perhaps some screen shots, would be great; also answers are searchable by future users with a similar problem, comments are not. – Michael Stimson Feb 18 '15 at 21:55
2

After working through Michael's suggestions in the comments above, I got to thinking about not just what privileges the user saved in the SDE connection had to the data, but what permissions it had with the database itself. As I mentioned in my original question, we have a few other SDE connections to different geodatabases; a production SDE and a testing SDE. I have used these other connections in python many times without any error. All of these connections reference the user sde, which has full privileges to the data. The production and testing geodatabases are also SDE owner, but the fabric SDE geodatabase is DBO owner. Based on this difference, I had my supervisor add the sde user to a role with dbowner permissions on the fabric database. Afterwards I attempted to execute the Make Feature Layer tool in python, which failed again with the same 000732 error. However, I then attempted to execute the Make Parcel Fabric Layer tool with python, and this process was successful. I was able to pass the resulting layer into other tools.

Unfortunately I do not have a good explanation for why this was successful. Making a layer is not a process that alters the data or makes a schema change, so needing owner level permissions does not make obvious sense. It also does not explain why the Make Feature Layer continued to fail in the script while being successful in the model. Perhaps a user with more experience can offer better insight, but at least I can move on now and finish my project.

  • Perhaps the parcel fabric layer is special, like raster layer or topology layer, which is why make feature layer didn't like the data. In the end it worked and you learned something. – Michael Stimson Feb 23 '15 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.