[MCOL-1880] ignore_malformed option of mcsimport does not take effect if csv file starts with malformed row Created: 2018-11-13  Updated: 2023-10-26  Resolved: 2022-11-05

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Zdravelina Sokolovska (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None

Epic Link: Consolidate & Redevelop All Columnstore Tools (SDK, Adapters, Backup, Restore, mcsimport)

 Description   

ignore_malformed option of mcsimport does not take effect if csv file starts with malformed row

[root@cps mcsimport]# cat nulls.csv
||NULL
NULL||NULL
NULL|NULL|NULL
|NULL|
,,
 
 
./mcsimport a ff nulls.csv  -ignore_malformed_csv -err_log
Error: Column size of input file is less than the column size of the target table
 
[root@cps mcsimport]# cat nulls.csv.1542121955911.err
error_type, column_nr, parsed_raw_row_values
[root@cps mcsimport]#
 

[root@cps mcsimport]# cat nulls.csv
,,
||NULL
NULL||NULL
NULL|NULL|NULL
|NULL|
,,
 
 
[root@cps mcsimport]# ./mcsimport a ff nulls.csv  -ignore_malformed_csv -err_log
Execution time: 0.836845s
Rows inserted: 2
Truncation count: 0
Saturated count: 0
Invalid count: 0
Ignored malformed csv count: 4
[root@cps mcsimport]# mcsmysql -u root -p1
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 48696
Server version: 10.3.10-MariaDB-log Columnstore 1.2.1-1
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select * from a.ff ;
+------+------+------+
| a    | b    | c    |
+------+------+------+
| NULL | NULL | NULL |
| NULL | NULL | NULL |
+------+------+------+
2 rows in set, 1 warning (0.298 sec)
 
 
[root@cps mcsimport]# cat nulls.csv.1542122024432.err
error_type, column_nr, parsed_raw_row_values
MALFORMED_CSV_LINE, -1, ||NULL
MALFORMED_CSV_LINE, -1, NULL||NULL
MALFORMED_CSV_LINE, -1, NULL|NULL|NULL
MALFORMED_CSV_LINE, -1, |NULL|



 Comments   
Comment by Todd Stoffel (Inactive) [ 2022-11-05 ]

This item is being closed because it was well passed the expiration date with no activity. If you suspect this was done in error please create a new ticket.

Generated at Thu Feb 08 02:32:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.