[ 
https://issues.apache.org/jira/browse/SQOOP-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233725#comment-13233725
 ] 

[email protected] commented on SQOOP-463:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4357/#review6138
-----------------------------------------------------------


I did not yet try how MySQL JDBC driver will behave myself, but column defined 
as TINYINT(1) might contain valid values in range 0-255 (in unsigned form). So 
if the driver is reporting type BIT for such columns, then there must be some 
data truncation. Therefore I would suggest extending this new section also for 
normal (non-hive) import case.

- Jarek


On 2012-03-20 20:10:41, Kathleen Ting wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4357/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-03-20 20:10:41)
bq.  
bq.  
bq.  Review request for Sqoop and Jarek Cecho.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Updated documentation.
bq.  
bq.  
bq.  This addresses bug SQOOP-463.
bq.      https://issues.apache.org/jira/browse/SQOOP-463
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    ./src/docs/user/troubleshooting.txt 1300726 
bq.  
bq.  Diff: https://reviews.apache.org/r/4357/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Built docs and verified.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Kathleen
bq.  
bq.


                
> Sqoop User Guide's troubleshooting section should explain how to override the 
> column mapping when importing a table from MySQL into Hive
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-463
>                 URL: https://issues.apache.org/jira/browse/SQOOP-463
>             Project: Sqoop
>          Issue Type: Improvement
>          Components: docs
>    Affects Versions: 1.4.1-incubating
>            Reporter: Kathleen Ting
>            Assignee: Kathleen Ting
>         Attachments: SQOOP-463-1.patch, SQOOP-463.patch
>
>
> When importing a table from MySQL into Hive where one of the columns is of 
> datatype TINYINT(1), Sqoop will automatically map this to the Hive datatype 
> boolean. This is because the MySQL JDBC connector maps the TINYINT(1) 
> datatype to java.sql.Types.BIT, which Sqoop by default maps to the Hive type 
> Boolean. Consequently, if you have values such as 1 or 0 in this column, they 
> will fail to parse correctly in Hive, instead appearing as all NULL values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to