Replace existing feature class data with new shapefile data

4711
9
Jump to solution
03-13-2017 08:33 AM
Highlighted
New Contributor II

I would like to replace existing feature class data with new shapefile data.  I receive periodic data updates in shapefile format that I would like to apply to existing feature classes.  IE existing feature class has 20 k rows of data, new file is updated with 2000 new rows of data, so 22k rows in the new shapefile.

I thought truncate (then load) would work, but getting an error.   Is there a more straight forward method I'm missing?

Any advice greatly appreciated ,....Thanks!!

using ArcGIS 10.4.1

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Honored Contributor

In that case, check the Overwrite the output of geoprocessing operations in Geoprocessing options of ArcMap.

Then run Copy Features tool to overwrite the older output.

You could automate the process, if required, by using it in a model builder or a python script.

View solution in original post

9 Replies
Highlighted
Honored Contributor

Why not append the new records to the existing feature class?

The new records will get added to the destination feature class, so you won't have to worry about replacing it.

Reply
0 Kudos
Highlighted
New Contributor II

Thanks,  I always receive a complete new file (rather than just the new records).  So there's some edits, and new records.

So I prefer to just replace the records all together.  I just tried "delete rows (data management)"  , then  loaded the new data.  Worked fine,  but is that a reliable efficient solution?  For the number of files I have to update, its not a big deal........ 

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

DeleteRows is not efficient (no "delete" is), but TruncateTable is, not that it would much matter with only 20k rows (but if you cross 500k rows, you'll notice a difference).

- V

Reply
0 Kudos
Highlighted
Honored Contributor

In that case, check the Overwrite the output of geoprocessing operations in Geoprocessing options of ArcMap.

Then run Copy Features tool to overwrite the older output.

You could automate the process, if required, by using it in a model builder or a python script.

View solution in original post

Highlighted
New Contributor II

worked great,  thank you.   Must beware of lack of warnings though, as I inadvertently overwrote a line file with a point file, different table structure.

Handy for me though,  thanks again!

Highlighted
Honored Contributor

I am glad that it worked for you!!!  

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

While jayanta.poddar‌ has answered your question I'll add a little tidbit as well:  I overwrite existing feature classes all the time, using the delete features tool, followed by the append tool in a model.  By doing so, I maintain the original schema of my target feature class, empty it out and replace it completely.  Using the append tool in a model is great in it allows you to set up mapping fields from the source data to the target data once and only once.

Highlighted
MVP Regular Contributor
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

asrujit_pb   since this one is "answered" and the other isn't, I put the duplicate comment on the other thread (and pointed here). 

Reply
0 Kudos