bin/obloader -h x -P 2883 -u root -t test -c prod -p --sys-password -D obcp4 --cut --all -f ./tmp --column-separator '|' --file-suffix 'tbl' --thread 16 --with-trim
INSERT INTO `supplier` (`S_SUPPKEY`,`S_NAME`,`S_ADDRESS`,`S_NATIONKEY`,`S_PHONE`,`S_ACCTBAL`,`S_COMMENT`)VALUES ('999','Supplier#000000999','XIA9uPu,fDZTOC,ItOGKYNXnoTvCuULtzmnSk','2','12-991-892-1050','3898.69','ironic requests snooze? unusual depths alongside of the furiously','');
Cause: The number of columns parsed does not match the number of columns in the table
# grep "XIA9uPu,fDZTOC,ItOGKYNXnoTvCuULtzmnSk" tmp/*.tbl
tmp/supplier.tbl:999|Supplier#000000999|XIA9uPu,fDZTOC,ItOGKYNXnoTvCuULtzmnSk|2|12-991-892-1050|3898.69| ironic requests snooze? unusual depths alongside of the furiously |
mysql> desc supplier;
+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| S_SUPPKEY | int(11) | NO | PRI | NULL | |
| S_NAME | text | NO | | NULL | |
| S_ADDRESS | text | NO | | NULL | |
| S_NATIONKEY | int(11) | NO | | NULL | |
| S_PHONE | text | NO | | NULL | |
| S_ACCTBAL | decimal(15,2) | NO | | NULL | |
| S_COMMENT | text | NO | | NULL | |
+-------------+---------------+------+-----+---------+-------+
7 rows in set (0.00 sec)
可以看到supplier只有7列,但是生成的csv数据中每行有7个分隔符"|",导致生成8个列(最后一个列为空)。
虽然可以清洗数据做到继续导入
就是想问问obloader导入时是否可以做到忽略其他列数据吗?