Is there a good way to update an SDE with FGDB data?

2376
8
10-07-2015 11:41 AM
Highlighted
New Contributor III

I have tried making an XML and using that as the upload but it just wants to give me additional copies of the same data. I have heard that I can do a truncate and append but is that only for table? Is it available for use on multiple feature classes?

I used to have a nice SDE connection to the County where it was easy to move the data over from their SQL to our but the connection was dropped a couple weeks ago and now I only have an FTP with a FGDB containing the majority of their data that I need to clip out for our City's needs.

Does anyone have any ideas?

Thanks-

Diane

City of Sarasota

8 Replies
Highlighted
Esri Esteemed Contributor

Hi Diane,

Truncate/Append will work on feature classes.  This method will work.  One thing to note, if the feature class is registered as versioned and the truncate/append is performed often, be sure you are compressing your database on regular basis.

Reply
0 Kudos
Highlighted
New Contributor III

Jake- There are a slew of feature classes though will I need to add them all one at a time?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

You can run the truncate/append tool in batch mode by right-click on the tool in the Catalog/Toolbox window > Batch.  Though, it will most likely be more beneficial to create a script/model to automate this process if the same feature classes are always updated. 

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I'm a huge fan of the simple data loader. 

Reply
0 Kudos
Highlighted
Regular Contributor III
  • How much data are you updating?
  • Is this a daily, weekly, monthly process?

The 'Truncate Table' tool will not work, if the Feature Class is Registered as Versioned. You will then have to use 'Delete Features' or 'Delete Rows' tool.

Highlighted
Esri Frequent Contributor

Adding the Geodatabase​ group.

--- George T.
Reply
0 Kudos
Highlighted
Regular Contributor

I'm assuming the only data coming from the county is data they manage in the first place so that your copies in SDE aren't versioned is that correct?

I've sent up 3 scheduled python jobs to handle cases like this.

Script 1 download and unzips the file geodatabase.

Script 2 copies up to a staging SDE database all the feature classes that need to be loaded.  You could do your clipping as part of this script.

Script 3 compares the schemas of the staged feature classes to the existing feature classes in our corporate SDE database.  If the schemas match I do the truncate append, if they don't match I send out an email alert and move on to the next feature class.

You could easily combine scripts 1 and 2 to keep things simple.

Reply
0 Kudos
Highlighted
New Contributor III

Yes, you are correct the data is all Countywide and it is not version but rather a 'copy' of the SDE that has been packaged up and place in their FTP location as a zip.

Would it be possible to get a copy of your scripts. They sound like exactly what I would like to do but I am a newbie at scripting but could modify one.

Reply
0 Kudos