I'm trying to import a great number of csv files of about 250MB each. I wrote a python script for that as follows:
import gc
import glob
tables = glob.glob("C:\\Users\\emportella\\Documents\\ArcGIS\\2517")
for table in tables:
arcpy.TableToGeodatabase_conversion(table, "C:\\Users\\emportella\\Documents\\ArcGIS\\2517\\Tables.gdb")
gc.collect()
It works for the first 4 to 6 files and without giving any warning is closes. i've payed attention to memory usage in Windows Task Manager and the process cosumes more and more memory until it craches.
I've already tried using some different aproches like using:
env.workspace = "C:\\Users\\emportella\\Documents\\ArcGIS\\2517\\*.csv"
tables = arcpy.ListTables()
arcpy.TableToGeodatabase_conversion(tables, "C:\\Users\\emportella\\Documents\\ArcGIS\\2517\\Tables.gdb")
The TableToGeodatabase_conversion
accepts list of tables but it craches the same way.
So there is the question is there a way to manage the memory used in arcpy framework?