Arcpy CopyFeatures_management inconsistency

950
2
08-07-2014 07:20 AM
PeterBaldwin
New Contributor II

Hello,

I've been using a Python script to try and copy a dataset from ArcSDE 10.1 Oracle 11g database to a local 10.1 file geodatabase. The dataset contains 10,997,525 records. Using the arcpy.CopyFeatures_management tool I'm not able to copy the entire dataset across. My first attempt copied 8,568,846 records and my second attempt copied 9,411,659 records. There are no error messages reported so it looks like it has copied the entire dataset correctly. This is a polygon dataset I'm trying to copy. I do have a line dataset with more records (30 million +) that copies all the records across correctly.

I've also tried using the ArcToolbox tool 'Copy Features' and it has a similar problem.

Thanks,

Peter.

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Peter,

This could possibly be a network issue.  Is the SDE Geodatabase on a different server than the File Geodatabase?

One thing you could try in your script:

1.  Use the Export XML Workspace Document tool and write the XML file to the SDE server

2.  Use shutil.copyfile to copy the XML file to the File Geodatabase server

3.  Use the Import XML Workspace Document tool to import the feature class

0 Kudos
PeterBaldwin
New Contributor II

Hi Jake,

Thanks for your reply. I tried doing that and got an error about self intersection so it looks like that was what was causing the issue. When you do Copy/Paste in ArcCatalogue you get the same error. I removed the problem record and retried Copy/Paste and it worked fine.

I don't understand why the CopyFeatures_management tool doesn't report any errors though and it looks like it has completed correctly. Also not sure why it copies across a different amount of records each time you run it, I would have expected it to be a consistent amount.

Thanks again,

Peter.

0 Kudos