Delete and Load records - Model Builder

2371
2
10-22-2013 07:05 AM
MikeBly
Occasional Contributor
Time to make things a little easier:

I have a repetitive monthly task of updating a handful of feature classes with updated data. Typically I delete all records and simply load in the new data. Is there a tool/function that I can drag into model builder that will delete all records without creating and empty feature and allow me to load the new data in from a shapefile.

So far I have not been able to find a tool that will allow me to delete all records and not receive and empty feature class error.

It really is that simple of a task, just time consuming, repetitive, and needs to be automated. I will keep looking, I could do this with a Python script likely, but I would like to utilize model builder a little more and I am still a rookie with python

Thanks for the input:

Mike
0 Kudos
2 Replies
TimWitt
Frequent Contributor
Hey Mike,

In what environment is your feature class sitting, SDE or a geodatabase? Is your data being used while you update? Can't you just delete the whole feature class and replace it with the updated one?

Tim
0 Kudos
MikeBly
Occasional Contributor
Hi Tim,

Data resides in a versioned SDE environment. I have tried to run the delete records tool, which seems to work, however, to load the data I have tried to used the Append tool, however, I am trying to run it on my own version as to not disrupt any other users.

I get an error that I must be the owner of the table. I am not too comfortable running it on the default version (owner), I am not sure how to get around this.

Typically I delete records from each feature class individually, load, all in my own version and then post.

Mike
0 Kudos