[
https://issues.apache.org/jira/browse/SQOOP-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Qian Xu updated SQOOP-1862:
---------------------------
Description:
I tried to export data from mysql to hdfs (using HdfsConnector), data is saved
to disk expectedly. When I export data from hdfs back to mysql, it fails. Here
is the error message:
{code}
nector.jdbc.GenericJdbcExecutor: Caught SQLException:
java.sql.BatchUpdateException: Data truncation: Incorrect date value: '’' for
column 'date' at row 1
at
com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1981)
at
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1388)
at
org.apache.sqoop.connector.jdbc.GenericJdbcExecutor.executeBatch(GenericJdbcExecutor.java:183)
at
org.apache.sqoop.connector.jdbc.GenericJdbcLoader.load(GenericJdbcLoader.java:58)
at
org.apache.sqoop.connector.jdbc.GenericJdbcLoader.load(GenericJdbcLoader.java:25)
at
org.apache.sqoop.job.mr.SqoopOutputFormatLoadExecutor$ConsumerThread.run(SqoopOutputFormatLoadExecutor.java:249)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect date
value: '’' for column 'date' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4224)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2840)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2334)
at
com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1933)
... 10 more
{code}
The date type of the column is "DATE". Dumped context looks like "20014-12-08".
was:
I tried to export data from mysql to hdfs (using HdfsConnector), data is saved
to disk expectedly. When I export data from hdfs back to mysql, it fails. Here
is the error message:
{code}
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect date
value: '’' for column 'date' at row 1
{code}
The date type of the column is "DATE". Dumped context looks like "20014-12-08".
> Sqoop2: Unable to export data to jdbc database
> ----------------------------------------------
>
> Key: SQOOP-1862
> URL: https://issues.apache.org/jira/browse/SQOOP-1862
> Project: Sqoop
> Issue Type: Bug
> Affects Versions: 1.99.5
> Reporter: Qian Xu
>
> I tried to export data from mysql to hdfs (using HdfsConnector), data is
> saved to disk expectedly. When I export data from hdfs back to mysql, it
> fails. Here is the error message:
> {code}
> nector.jdbc.GenericJdbcExecutor: Caught SQLException:
> java.sql.BatchUpdateException: Data truncation: Incorrect date value: '’'
> for column 'date' at row 1
> at
> com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1981)
> at
> com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1388)
> at
> org.apache.sqoop.connector.jdbc.GenericJdbcExecutor.executeBatch(GenericJdbcExecutor.java:183)
> at
> org.apache.sqoop.connector.jdbc.GenericJdbcLoader.load(GenericJdbcLoader.java:58)
> at
> org.apache.sqoop.connector.jdbc.GenericJdbcLoader.load(GenericJdbcLoader.java:25)
> at
> org.apache.sqoop.job.mr.SqoopOutputFormatLoadExecutor$ConsumerThread.run(SqoopOutputFormatLoadExecutor.java:249)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect
> date value: '’' for column 'date' at row 1
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4224)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2840)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2334)
> at
> com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1933)
> ... 10 more
> {code}
> The date type of the column is "DATE". Dumped context looks like
> "20014-12-08".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)