Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.4.6
-
None
-
None
Description
The following command:
sqoop import --connect jdbc:mysql://localhost/test --username root --password 'cloudera' --table decimal_table -m 1 --driver com.mysql.jdbc.Driver --verbose --hive-import --hive-database default --hive-table decimal_table --hive-overwrite --map-column-hive a='DECIMAL(10,4)'
will fail with below error:
17/03/13 18:42:09 DEBUG sqoop.Sqoop: Malformed mapping. Column mapping should be the form key=value[,key=value]* java.lang.IllegalArgumentException: Malformed mapping. Column mapping should be the form key=value[,key=value]* at org.apache.sqoop.SqoopOptions.parseColumnMapping(SqoopOptions.java:1333) at org.apache.sqoop.SqoopOptions.setMapColumnHive(SqoopOptions.java:1349) at org.apache.sqoop.tool.BaseSqoopTool.applyHiveOptions(BaseSqoopTool.java:1198) at org.apache.sqoop.tool.ImportTool.applyOptions(ImportTool.java:1011) at org.apache.sqoop.tool.SqoopTool.parseArguments(SqoopTool.java:435) at org.apache.sqoop.Sqoop.run(Sqoop.java:135) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243) at org.apache.sqoop.Sqoop.main(Sqoop.java:252) Malformed mapping. Column mapping should be the form key=value[,key=value]*
--map-column-hive should support DECIMAL(10,5) format.