LibreCat / Catmandu

Catmandu - a data processing toolkit
https://librecat.org
176 stars 31 forks source link

CSV importer problem with ; as separator #121

Closed TLINDEN closed 9 years ago

TLINDEN commented 9 years ago

Hi,

if I call the command line client this way:

catmandu convert -v CSV to YAML < users.csv

I get:

EHR - getline_hr () called before column_names () at ~/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/Catmandu/Importer/CSV.pm line 54.

The input file is a simple CSV with quoted fields, the first line denotes the field names, separated by semicolon:

"ID";"NAME"
"8";"max"
"9";"ida"

If the fields are separated by comma, everything works as expected.

nichtich commented 9 years ago

We should improve the documentation of https://metacpan.org/pod/Catmandu::Importer::CSV to not only refer to perl code but command line usage as well. It works as this:

catmandu convert -v CSV --sep_char \; to YAML < users.csv
TLINDEN commented 9 years ago

Ah I see. And thanks a lot for such a wonderful module!

best, Tom