sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael England (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-1473) Sqoop import converts Microsoft SQL Server bit (1 or 0) data type to true/false
Date Thu, 30 Oct 2014 10:27:33 GMT

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

Michael England commented on SQOOP-1473:
----------------------------------------

Just to add to this - if I override a bit data type in SQL Server using --map-column-java
<bit data type column>=Integer then it is saved as a 1 or a 0 as expected. This should
be done by default in Sqoop.

Thanks


> Sqoop import converts Microsoft SQL Server bit (1 or 0) data type to true/false
> -------------------------------------------------------------------------------
>
>                 Key: SQOOP-1473
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1473
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.4.4
>         Environment: Using Sqoop 1.4.4 in MapR 3.1
>            Reporter: Michael England
>              Labels: binary, bit, boolean, false, import, mappings, override, postgresql,
server, sql, sqoop, true
>
> When moving data between Microsoft SQL Server and Hadoop, a 'bit' data type in SQL Server
(a 1 or a 0) is stored as 'true' or 'false' in the generated CSV. This means when an external
Hive table is created over this data, the data type has to be set as boolean for this column.
If a binary Hive data type is used, weird characters are shown as the underlying data is 'true'
or 'false'.
> This can cause issues if the data needs to be moved from Hadoop back into SQL Server
as a data type conversion is needed. Therefore, it would be best to implement a 'boolean-true-string'
and a 'boolean-false-string' option to override this like what has been done for PostgreSQL.
N.B. I'm not using a hive-import and therefore can't override mappings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message