Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Issue with --map-column-java in sqoop command within Hortonworks platform

avatar
New Member

I'm importing data from our SQL server database to HDFS with Sqoop. Some tables have bit data type in SQL Server. By default, sqoop will convert the bit column like 1->true 0 -> false. We want the data be converted to int type 1 or 0. So I tried the option --map-column-java. For example sqoop ... --map-column-java isactive=int; and even --map-column-java isactive=string, Neither works. I always got error : ERROR orm.ClassWriter: No ResultSet method for Java type integer ERROR tool.ImportTool: Imported Failed: No ResultSet method for Java type integer. Seems in Hortonworks platform, sqoopt doesn't support this option?

1 ACCEPTED SOLUTION

avatar
Super Guru

@Lucy zhang

Please try the following:

--map-column-java isactive=Integer or

--map-column-java iactive=String

also try the following

--map-column-hive isactive=STRING or

--map-column-hive iactive=INT

View solution in original post

2 REPLIES 2

avatar
Super Guru

@Lucy zhang

Please try the following:

--map-column-java isactive=Integer or

--map-column-java iactive=String

also try the following

--map-column-hive isactive=STRING or

--map-column-hive iactive=INT

avatar
New Member

Thanks. The upper case of first letter for java type works. --map-column-java isactive=Integer,etl_isactive=Integer. Execution successfully: INFO mapreduce.ImportJobBase: Retrieved 88281 records.