Python Script for Data Management

448
1
04-26-2018 12:46 PM
JosephTapanes
New Contributor

I need help with writing a python script to automate data management. I have ArcMap 10.4. I receive three shapefile updates every day: line, point, and polygon. The shapefiles are updates, but there are some duplicate records in them from the previous update. This is my data management workflow every morning: I use ArcCatalog to "append" the points, lines, and polygons - so that I only have three shapefiles and not 3 X #days. For the "append", I import the shapefiles into a gdb (right click on the gdb and import). As feature classes, I right click on the gold version (the one that I append the updates to) and select load>load data. And that is how I append the updates for the three layers. I've found that this is much faster than using the geoprocessing append tool. Then I run the Delete Identical tool to delete the duplicates records (I have an enterprise global ID in the attribute table).

A script that automates this workflow would save me a ton of time. Any ideas?

0 Kudos
1 Reply
JoeBorgione
MVP Emeritus

You might want to create a model to emulate the workflow, exactly how you have described it.  From there you can export it to a python script.  Just be aware that sometimes the export to python isn't a perfect process.  At any rate, if you create the model first, you will at least get the logic in place, and then you can worry about python later...

That should just about do it....