When I try to import a csv file into a PostgreSQL table with the Gdal ogr2ogr tool I get the "Unable to open datasource" Failure.
So I tried to open it with the tool ogrinfo and I get the same Failure.
I use it in a Ubuntu 10.10, with the package gdal-bin version 1.6.3-4build1.
This is the command:
> ogrinfo test.csv
FAILURE:
Unable to open datasource `test.csv' with the following drivers.
-> ESRI Shapefile
...
-> CSV
...
This is the content of the "test.csv" file:
col1;col2;col3;col4
1;a;row1;11
2;b;row2;22
3;c;row3;33
4;d;row4;44
5;e;row5;55
6;f;row6;66
Any help?
Could it be the version of gdal bin? kind of old OS I know.
Best Answer
Ok. I think the problem is with the Gdal-Bin version. I tried in the same environment another csv file but with comma separator, not semicolon, and it worked.
Then I tried the "test.csv" with semicolon separator in my home pc, with the version of gdal-bin 1.7.3-6ubuntu3, and it was imported perfectly.
So my conclusion is that the gdal-bin version 1.6.3-4build1 has some problems importing CSV files with semicolon separator.
Thank you all for your comments.