I'm trying to move a feature class on our network SDE that's made up of polylines as a CSV file to the local machine (or fileGDB but slow speed seems to be the theme regardless of output format)
import arcpy, csv import datetime from arcpy import env def tableToCSV(input_tbl, csv_filepath): fld_list = arcpy.ListFields(input_tbl) fld_names = [fld.name for fld in fld_list] with open(csv_filepath, 'wb') as csv_file: writer = csv.writer(csv_file) writer.writerow(fld_names) with arcpy.da.SearchCursor(input_tbl, fld_names) as cursor: for row in cursor: writer.writerow(row) print csv_filepath + " CREATED" csv_file.close() env.workspace = r"Q:\SDE\Direct Connection to delivery.sde" desiredFC = arcpy.ListFeatureClasses("","","Topography") for fc in desiredFC: if fc == 'Contours': print 'Starting to Process/' + fc startTime = datetime.datetime.now() out_csv = "C:\Users\CHOK\Desktop\Extract Data Method/" + fc[14:] + '.csv' tableToCSV(fc, out_csv) endTime = datetime.datetime.now() print 'Finished Processing/' + fc print 'It took ' + str(endTime - startTime) + ' to process ' + fc raw_input('Press Enter to exit')
When I run the above script, I see that transferring 3.6 gb of data from the SDE to a CSV (or file geodatabase using arcpy copy methods) takes more than 3~4 hours to run.
I can see in task manager that the network speed utilised is usually between 0.3 Mbps to 2 Mbps but sometimes the speed jumps to 10~20 Mbps and other feature classes are transferred at around 5~7 Mbps.
Is there something I can try to improve the speed at which SDE stored on the network is copied over to a local drive or is this a lost cause due to the network currently in place?