I'd like to add the ability for the LOAD DATA INFILE command to auto-detect
the format of the input file.  Here's a proposal for how it would work:

1. If the HEADER_FILE option is supplied, obtain the format from that file

2. If no option is supplied, then if the first line begins with a '#'
character, then determine the format from that line.  Otherwise, if the
first line contains two tabs, assume the format is (row, column, value).  If
the first line contains three tabs, assume the format is (timestamp, row,
column, value).

3. If the FORCE_AUTODETECT option is supplied, then read the first line in
the file and assume the file is in single-cell-per-line format.  If the
first line contains two tabs, assume the format is (row, column, value).  If
the first line contains three tabs, assume the format is (timestamp, row,
column, value).

I believe this should cover all situations.  Let me know if you see any
problems with this approach or have an alternate suggestion.

- Doug

-- 
You received this message because you are subscribed to the Google Groups 
"Hypertable Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hypertable-dev?hl=en.

Reply via email to