22 May
2018
22 May
'18
3:06 p.m.
Hi all:
I am receiving an error "Failed to import table ... Leftover data ..."
I am using a simple BASH script and the mclient tool to import my data from hundreds of CSV files. The fields are pipe | separated, text values are surrounded with double-quotes, and rows end with LF (\n).
This is the command I am using to process the files -
for csvfile in `ls | grep -i 2018.*.csv$`; do mclient -d mydatabase -s "COPY INTO table FROM '/path/to/csv/files/$csvfile' USING DELIMITERS '|', '\n', '"'"; done
I have a .monetdb file setup in my home directory so as not to need the username and password.
Thanks kindly,
Adam Doherty