简体   繁体   中英

sqoop export from hive table created by sqoop import

I've successfully imported a simple 2 column SQL Server data into HIVE using SQOOP on Cloudera CDH4.1. - id (int) - description (varchar(50))

When I try get the same HIVE table to go back to SQL Server it lumps the two columns together and therefore creates an NumberFormatException.

I've tried the --fields-terminated by \\t --lines-terminated-by \\n and this doesn't make any difference.

I've also tried to export the sample_08 Hive table as supplied by Cloudera but get a NoSuchElement exception. Wish it would give a clue as to which element it thinks doesn't exist!

I've ensured that the table structures and field names are both the same on both sides including the case and underscores.

I can export a single column table but am absolutely stumped as to how to resolve the issue.

Any help would be gratefully received.

Parameters --filds-terminated-by and --lines-terminated-by are used only during "import" operation. You need to use parameters --input-fields-terminated-by and --input-lines-terminated-by to do the same in "export" case.

Would you mind sharing entire exception stack trace and possibly example set of your data that trigger your issue?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM