When working with Sqoop to import data from Oracle into hive, there is a mismatch in hive data because of a newline in a field of type Clob in Oracle. Even the addition of--hive-drop-import-delims is not valid.
Through the query, found that there are two kinds of solutions,
One is to explicitly convert the type of a field of type Clob in Oracle through CAST (column_name as VARCHAR2 (4000)).
The other is to use--map-column-java col1=String,col2=String 来显式说明某字段在java中的类型。
For the second way, see Https://stackoverflow.com/questions/28076200/ Hive-drop-import-delims-not-removing-newline-while-using-hcatalog-in-sqoop
Sqoop documentation for instructions on changing parameters, see: Http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_literal_blob_literal_and_literal_ Clob_literal_columns
Hive-drop-import-delims option is not valid for Oracle's CLOB