col_names skip_first_row By default DBD::CSV assumes that column names are stored in + the first row of the CSV file and sanitizes them (see "raw_head +er" below). If this is not the case, you can supply an array re +f of table names with the col_names attribute. In that case the attribute skip_first_row will be set to FALSE. If you supply an empty array ref, the driver will read the +first row for you, count the number of columns and create column +names like "col0", "col1", ... Note that column names that match reserved SQL words will c +ause unwanted and sometimes confusing errors. If your CSV has he +aders that match reserved words, you will require these two attri +butes. ... raw_header Due to the SQL standard, field names cannot contain special characters like a dot (".") or a space (" ") unless the col +umn names are quoted. Following the approach of mdb_tools, all + these tokens are translated to an underscore ("_") when reading t +he first line of the CSV file, so all field names are 'sanitized'. I +f you do not want this to happen, set "raw_header" to a true value a +nd the entries in the first line of the CSV data will be used verb +atim for column headers and field names. DBD::CSV cannot guarantee +that any part in the toolchain will work if field names have those characters, and the chances are high that the SQL statement +s will fail.
I'll think of a more clear way to document what this sanatation actually means.
In reply to Re^2: DBD::CSV works with text, but not numbers
by Tux
in thread dbi::CSV works with text, but not numbers
by Sandy_Bio_Perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |