[MCOL-382] Not able to import csv file (LOAD DATA INFILE) Created: 2016-10-30 Updated: 2017-08-09 Resolved: 2016-11-29 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.0.4 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Minor |
| Reporter: | Christian Hotz-Behofsits | Assignee: | David Thompson (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 16.04.1 LTS (Linux db-imsm 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux) |
||
| Issue Links: |
|
||||||||
| Description |
|
I tried to import a csv file into an existing table. But I get the following error:
My err.log contains the following lines:
And my info.log/debug.logs are flooded by messages like the following one (up to 5 per second):
Server version: 10.1.18-MariaDB Columnstore 1.0.4-1 |
| Comments |
| Comment by David Thompson (Inactive) [ 2016-10-31 ] |
|
The error log is benign and not due to this, it is being tracked in |
| Comment by David Thompson (Inactive) [ 2016-10-31 ] |
|
Can you add the cpimport command and maybe a sample of your data if possible to help repro? Check also if you are specifying the right arguments for your data format, documented here: Especially -s (field seperator) and -E (enclosed by character). For CSV you might need something like the following: -s ',' -E '"' depending on your exact format? |
| Comment by David Thompson (Inactive) [ 2016-11-29 ] |
|
Closing as cannot repro due to lack of activity. Please reopen if you have time to test this and still have issues. |
| Comment by Damon [ 2017-08-08 ] |
|
Experiencing this issue. |
| Comment by David Thompson (Inactive) [ 2017-08-09 ] |
|
So if you use insert select with no transactions what happens is we optimize this internally to a cpimport call but there are some limitations to this because it has to effectively convert the data to csv. I'd take a guess you might be hitting a problem with your data containing a delimeter. deepvoice There is a system variable to override this: Also if it works in a transaction then that would also likely be the problem since that just maps to slower direct inserts. I'd also check the columnstore and mysql error logs. In the case of when cpimport is used internally you might see some .bad and .err files in under mysql/db that might point to what is going on. If you have more details it'd be best to file as a new jira and if possible provide the problem data (if you don't want to post that on public jira we can exchange that some other means). |
| Comment by Damon [ 2017-08-09 ] |
|
REPLACE(data,'\'','\\\''), I didn't even think about the character sets. Who does in the 21st century. But alas this is it. Unable to change to a data set that works with single quotes. |
| Comment by Damon [ 2017-08-09 ] |
|
Actual error row count(1) exceeds the max error rows I have hundreds of millions of rows. Any guidance on how to find whatever it is that is causing it? I am not doing a file import, I am doing a table (InnoDB) to table (CS) copy. |
| Comment by Damon [ 2017-08-09 ] |
|
figured it out. cpimport with debug 3 and errors set to a high number. cpimport <db> <table> <path_to_datafile> -d 3 -s '|' -E '"' -C '\N' -j 3001 -S -e 50000 |
| Comment by David Thompson (Inactive) [ 2017-08-09 ] |
|
Excellent - i was just about to start looking at this. |