-3

I have many separate field data files in CSV format and I wish to automatically convert these CSV files into a geodatabase to be able to load them into a schema I created for them in my new ArcSDE enterprise database. The SDE version is 10.1. I am able to do this manually in ArcGIS but I have over 500 files to complete and so I do need a script will automate it for me.

I would be glad to have the output in a form of a feature class. I do not have an existing output dataset besides the ones I did manually, it needs to be created from scratch using the CSV files as input dataset.

I appreciate any help I can get from here and thank you very much for your consideration and time.

  • 5
    More info please... What code have you got so far? What version of ArcGIS are you using? Or are you trying to load using the file geodatabase API via OGR? Your title states "file geodatabase", but the question body specifies SDE. Which is it? – user2856 Jun 19 '12 at 1:35
  • 4
    More questions: Is the desired output a feature class or a standalone table? Does the output dataset already exist and you simply want to append rows into it, or must it be created from scratch? Posting a sample from your CSV file would also be very helpful. – blah238 Jun 19 '12 at 1:37
8

Please have a look at the Copy Rows geoprocessing tool.

The code can be as simple as the following:

import arcpy
arcpy.CopyRows_management("C:/data/vegtable.csv", "C:/output/output.gdb/vegtable")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.