[
https://issues.apache.org/jira/browse/SQOOP-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14385245#comment-14385245
]
Pawan Pawar edited comment on SQOOP-2272 at 3/28/15 11:12 AM:
--------------------------------------------------------------
I tried with sqoop --map-column-hive option but it convert it into default
precision and scale i.e. (10,0). I also used --hive-overwrite option but it
changed the decimal to double.
was (Author: [email protected]):
I tried with sqoop --map-column-java option but it convert it into default
precision and scale i.e. (10,0). I also used --hive-overwrite option but it
changed the decimal to double.
> Import decimal columns from mysql to hive 0.14
> ----------------------------------------------
>
> Key: SQOOP-2272
> URL: https://issues.apache.org/jira/browse/SQOOP-2272
> Project: Sqoop
> Issue Type: Bug
> Components: sqoop2-shell
> Affects Versions: 1.4.5
> Reporter: Pawan Pawar
> Priority: Minor
>
> I am importing data from mysql to hive. several columns in source table are
> of type decimal. but sqoop convert this types into the double. How can I
> import that table with same precision and scale in hive.
> My query is:
> sqoop import --connect
> jdbc:mysql://localhost:3306/SourceDataBase?zeroDateTimeBehavior=convertToNull
> --username root --password root --hive-table MyHiveDatabaseName.MyTableName
> --hive-import --hive-table MyHiveDatabaseName.MyTableName --query 'select *
> from MyTableName where $CONDITIONS' -m 1 --target-dir
> /user/hive/warehouse/MyHiveDatabaseName/MyTableName
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)