arcpy Delete_Management issue

961
3
Jump to solution
11-03-2016 08:56 AM
ChrisMowry
New Contributor II

I am using the arcpy.Delete_management() function to delete a feature class in an SDE environment, but this tool keeps creating a layer with the same name except with "_H" at the end. Does anyone know of a workaround for this?

0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

My guess, archiving is enabled on these features classes.  I don't work with archiving much, but I believe when someone deletes a feature class that is archived, the archive of the feature classes gets promoted to a full-fledged feature class with the "_H" suffix.

View solution in original post

3 Replies
JoshuaBixby
MVP Esteemed Contributor

My guess, archiving is enabled on these features classes.  I don't work with archiving much, but I believe when someone deletes a feature class that is archived, the archive of the feature classes gets promoted to a full-fledged feature class with the "_H" suffix.

ChrisMowry
New Contributor II

Winner, winner, chicken dinner! Thanks man! Yeah that's exactly what happens. When I disable archiving before the delete method is run, the issue is resolved.

0 Kudos
MitchHolley1
MVP Regular Contributor

Do you have an workspace environment set (arcpy.env.workspace)?

0 Kudos