Has anyone ever had issues importing a .csv as events into ArcMap (or Pro) and having it interpret String fields with a length of 8000? This winds up creating viable feature classes with the same issue that break most geoprocessing tools because of the field lengths. I'd love to know how to avoid this.
I haven't tried this, but you could create a schema.ini file that defines the exact widths you want to define for each field in the csv that you're importing, and make sure that schema.ini is in the same folder as the .csv.
Here's some doc: Adding an ASCII or text file table—Help | ArcGIS Desktop
Here's a quick example I had sitting around in a folder:
Hope this helps!
Hi Jason, this bug has been in the system a while. It's marked as medium severity. If it's breaking gp tools please contact tech support and reference bug number BUG-000086039 so the severity can be upgraded.
I just have it for the first time after several years using .csv with text columns as the most reliable format for joins. What a bummer that such a bug does not get addressed and thanks for the workaround! My first attempt was to export the csv to a dbf and set the text length to 254. It still did not work. The join-values come from the file that I want to link back to. So next attempt in a new project did work with the newly created dbf but not the original csv.
It works! I tried it today. Just make sure the schema.ini file is in the same folder as the csv or txt file you are importing/adding.
excel seems to be the culprit. But I use excel or quattro pro to produce csvs all the time but they go to numpy structured arrays and I usually set the dtype myself. I will be paying attention more to np.genfromtxt to see the dtypes produced.
There is a related issue with file gdb's with TableToNumPy array. So whatever is going on needs to be monitored if working in that environment. PS, a schema is like setting a dtype for a structured/recarray
Kory, that sounds like an awesome work around. If it worked well, it would be good to add that to the bug information.
Dan, I get the 8000 characters thing from CSVs and my CSVs are created from Excel. So, maybe Excel is the culprit here...
That bug has been around for a while. I haven't experienced it with csv files using ArcGIS Pro. I have created them using text editors and as the outputs from numpy and other programs.
How was your csv file created? From Excel or some other program?
Jason,
I've had this happen a few times but have not found any issues with geoprocessing tools. Which tools are not working for you?
sample of a few rows?
sounds like you may be missing newline delimiters
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.