If you encounter an error like:
"ERROR: extra data after last expected column"
you may have encountered a problem with command line parsing. If you used a single quote delimiter in your CSV input file, and the input data includes a comma within one of the text strings to be loaded, you will see this error.
To correct this, you will need to escape the single quote character when specifying it using the -q option on the command line as -q"\'".
Here is an example:
Assume the file test.txt, which we are attempting to load into table table1 includes the following input data row:
1, 25, "Some text with a, comma in it."
The following will not load, returning the "Error: extra data after last expected column" error:
ncluster_loader -l 10.50.129.103 -U db_superuser -w db_superuser -d beehive -c -q"'" table1 test.txt
The following will load:
ncluster_loader -l 10.50.129.103 -U db_superuser -w db_superuser -d beehive -c -q"\'" table1 test.txt