Eric Lin created SQOOP-3152:
-------------------------------

             Summary: --map-column-hive to support DECIMAL(xx,xx)
                 Key: SQOOP-3152
                 URL: https://issues.apache.org/jira/browse/SQOOP-3152
             Project: Sqoop
          Issue Type: Bug
            Reporter: Eric Lin
            Assignee: Eric Lin
            Priority: Minor


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:

{code}
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]*
{code}

--map-column-hive should support DECIMAL(10,5) format.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to