Replace existing feature class data with new shapefile data

9397
9
Jump to solution
03-13-2017 08:33 AM
NCantwell
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

0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed 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.



Think Location

View solution in original post

9 Replies
JayantaPoddar
MVP Esteemed 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.



Think Location
0 Kudos
NCantwell
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........ 

0 Kudos
VinceAngelo
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

0 Kudos
JayantaPoddar
MVP Esteemed 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.



Think Location
NCantwell
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!

JayantaPoddar
MVP Esteemed Contributor

I am glad that it worked for you!!!  



Think Location
0 Kudos
JoeBorgione
MVP Emeritus

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.

That should just about do it....
RebeccaStrauch__GISP
MVP Emeritus

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

0 Kudos