Sqoop import - connect JDBC: mysql://localhost: 3306/report - the username root - password root - table GOO_GOODS hive - import - m 1 -- hive - overwrite - hive - table report. GOO_GOODS - fields - terminated - by ', '
In the table data is imported into the hive, but actually there are two rows of data by a newline, as follows: (hollow holes (taxi))
1403101618482510201-03-10 16:18:48. 0, b310A10008, 510085, and only 5, bushing, control arm KZBCT, 20,11.0, 1 k0407183a, 20,0,2015-09-01 17:23:16. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
1403101618482502201-03-10 16:18:47. 0, b310A10007, 510074, and only 5, rubber lining, control arm under XKZBJT,,5.0 20, 811407181 a, 20,0,2015-09-01 17:23:16. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
1403101618472494201-03-10 16:18:47. 0, b310A10006, 510080, and only 5, bushing, control arm KZBCT, 20,4.3,20,0,2015 357407182-09-01 17:23:16. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
1403101618472486201-03-10 16:18:47. 0, b310A10005, 510067, and only 5, rubber sleeve hem arm \, XBBJT \ d, 20,9.3, 191407181 d, 20,0,2015-09-01 17:15:21. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
,8.8 XKKX (czczy), 20, 191407181 bg, 20,0,2015-09-01 17:23:16. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
Hollow holes (taxi), KZBCT
1403101618472478201-03-10 16:18:47. 0, b310A10004, 510232, and only 5, control arm bushings
,8.8 XKSX (czczy), 20, 191407181, eg, 20,0,2015-09-01 17:23:16. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
Small solid (taxi), KZBCT
1403101618472470201-03-10 16:18:47. 0, b310A10003, 510231, and only 5, control arm bushings
1403101618472462201-03-10 16:18:47. 0, b310A10002, 510066, and only 5, rubber sets of large \ \ has hem arm, XBBJT \ d \ yb,,8.8 20, 191407181 a, 20,0,2015-09-01 17:15:21. 0130041114325, 0138300000000117, 0140171394410, 3138300000000
1403101618472454201-03-10 16:18:46. 0, b310810030, 730240, and 7, control arm, KZB, 20156.0 versus, 1 k0407152m, 20,0,2016-01-11 17:08:23. 0130041114325 0138280000000116 8140171394410 3138280000000
1403101618462446201-03-10 16:18:46. 0, b310810029, 730239, and 7, control arm, KZB, 20156.0 versus, 1 k0407151m, 20,0,2016-01-11 17:08:23. 0130041114325 0138280000000116 8140171394410 3138280000000
CodePudding user response:
I'm sorry, you ask question there is nothing I can do, can't give you a reply,CodePudding user response:
Sudo -u hive sqoop import - connect JDBC: mysql://${miguanMysqlHost}/${miguanDatabaseName}, ${miguanMysqlUser} the username, password, ${miguanMysqlPwd} - table applibrary - hive - import - hive - table ${hiveDBName}. Applibrary - hive - drop - import - delims - fields - terminated - by '001 \' - the lines - terminated - by '\ n' - the hive - overwriteAdd:
- the hive - drop - import - delims - lines - terminated - by '\ n' & lt; br>
- hive - drop - import - delims means: delims Drops \ n \ r, and \ 01 the from string fields when importing to hive.
Delims
Drops \ n \ r, and \ 01 the from string fields when importing to Hive.