Hive-drop-import-delims option is not valid for Oracle's CLOB

Source: Internet
Author: User
Tags sqoop

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.