what arcpy function does Data/Export Data correspond to?

2830
5
Jump to solution
04-30-2014 10:24 AM
JianLiu
New Contributor III
I need to export an xyEvent layer to a shapefile. It is a big file with about 59000 records. When I used the context-sensitive menu/Data/Export Data option in ArcMap, the export took only a few seconds. However, when I try to implement it in Arcpy, it doesn't seem that I can find the right function that can perform this fast. I've tried

arcpy.FeatureClassToFeatureClass_conversion and
arcpy.CopyFeatures_management

Each one takes minutes to finish. Is there another function I should use? I am using 10.1. Thanks people!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JoshuaChisholm
Occasional Contributor III
Hello Jian,

I think you can use arcpy.Select_analysis the same as arcpy.FeatureClassToFeatureClass_conversion and arcpy.CopyFeatures_management. Just don't specify a where statement and it will export all records in the input feature layer.

I don't think it would be any faster than arcpy.FeatureClassToFeatureClass_conversion or arcpy.CopyFeatures_management, but it might be worth a try.

View solution in original post

0 Kudos
5 Replies
JoshuaChisholm
Occasional Contributor III
I'm not sure if it will be faster, but you can try Select Analysis.
0 Kudos
JianLiu
New Contributor III
Joshua,

Thank you very much for the reply!

But I don't see how Select Analysis will help me to do the export faster? I want to export all the features....

Jian
0 Kudos
JoshuaChisholm
Occasional Contributor III
Hello Jian,

I think you can use arcpy.Select_analysis the same as arcpy.FeatureClassToFeatureClass_conversion and arcpy.CopyFeatures_management. Just don't specify a where statement and it will export all records in the input feature layer.

I don't think it would be any faster than arcpy.FeatureClassToFeatureClass_conversion or arcpy.CopyFeatures_management, but it might be worth a try.
0 Kudos
JianLiu
New Contributor III
Joshua,

It is MUCH FASTER! It just took seconds to export the file, about the same as using Export Data.

Just curious why CopyFeatures and featureClassToFeatureClass would be that slow... But thanks a lot and appreciate it!

Jian

Hello Jian,

I think you can use arcpy.Select_analysis the same as arcpy.FeatureClassToFeatureClass_conversion and arcpy.CopyFeatures_management. Just don't specify a where statement and it will export all records in the input feature layer.

I don't think it would be any faster than arcpy.FeatureClassToFeatureClass_conversion or arcpy.CopyFeatures_management, but it might be worth a try.
JoshuaChisholm
Occasional Contributor III
Awesome! I'm happy it worked out! Just make sure all your records are coming through.

I'm not exactly sure why it would be that much faster. I know SQL can be very fast, maybe it doesn't have to go through ArcObjects or something...