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

Venkat Ranganathan commented on SQOOP-935:
------------------------------------------

[~zhangguancheng]

Oracle date format has been changing with releases - 8, 9-10 and 11g-12c all 
have differing behaviors.   One workaround is to specify a Oracle JDBC specific 
property

The easiest way to do is to create connection parameter file and specify this 
in the file as per your requirement. 
oracle.jdbc.mapDateToTimestamp=<true or false>

  Assuming you saved this to a file name oraconn.props

This is how you specify the connection parameter file in the sqoop command line


sqoop import --connect jdbc:oracle:thin:@<host>:<port>:<sid> --table EMP 
--username <user> --password <pass> --connection-param-file <connparam-file>  
<rest of the parameters>

where values within <,> should be substituted as needed.

Can you check and update this JIRA

Thanks
                
> DATE columns in an Oracle database should be imported as a JDBC TIMESTAMP
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-935
>                 URL: https://issues.apache.org/jira/browse/SQOOP-935
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.2
>            Reporter: zhangguancheng
>
> If not, data of DATE imported from orcale 9i-10g will be lack of time 
> information. That's because the Oracle DATE SQL type contains both date and 
> time information as does java.sql.Timestamp while 9i-10g drivers maps SQL 
> DATE to JDBC DATE type which represents a date consisting of day, month, and 
> year. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to