thisisnic commented on issue #37908:
URL: https://github.com/apache/arrow/issues/37908#issuecomment-1744987621

   Thanks, that's really helpful!  I wondering if a nice solution here might be 
to create wrapper functions, e.g. `csv_parse_options()` etc, which just call 
`CSVParseOptions$create()` but are more nicely documented.  I feel like this 
may only partially solve your problem though - the docs could be simpler to 
find, but perhaps the error message could be improved too.
   
   The error message:
   ```
   Error in `open_dataset()`:
   ! Invalid: Error creating dataset. Could not read schema from 
'/home/nic/test_data.txt'. Is this a 'csv' file?: Could not open CSV input 
source '/home/nic/test_data.txt': Invalid: CSV parse error: Row #2: Expected 5 
columns, got 2: 1|"RM-4.15|1958||1
   2||||1
   ```
   
   I think the problem here is that that error could be caused by multiple 
problems, so it's not definitive.  We technically could search for the quote 
character in the problematic line and if there is an uneven number, mention 
that, but I'm a bit unsure if it's a bit of a fringe case.  Perhaps it's not 
though given someone else had the same issue!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to