Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Contributor

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
Contributor

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.