|
A way is needed to configure the desired datatype for each field/column of a CSV file during import.
The standard approach used by other tools is to display a dialog after parsing the first line/lines and allow the selection of the datatype from a menu for each of the field/column names.
Another approach would be to define the second row of the CSV as a type only line, with the datatypes separated by commas. Then a simple flag in the import dialog could signal that the second line in the CSV file should select the datatypes for each field/column.
Name,Address,Birthdate,Widgets,Mobile,Spend
|
$string,$string,$date,$numberLong,$string,$numberDecimal
|
|