<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question sqoop incremental load failed with timestamp in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150739#M32598</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to run sqoop incremental imports from Teradata to HDFS but running into issues with time stamp.&lt;/P&gt;&lt;P&gt;my sqoop command:&lt;/P&gt;&lt;P&gt;sqoop import \ &lt;/P&gt;&lt;P&gt;--connect jdbc:teradata://PH/DATABASE=hadoop,CHARSET=UTF8 \ &lt;/P&gt;&lt;P&gt;--driver "com.teradata.jdbc.TeraDriver" \ &lt;/P&gt;&lt;P&gt;--username hadoop \ &lt;/P&gt;&lt;P&gt;--password Hadoop \ &lt;/P&gt;&lt;P&gt;--table item \ &lt;/P&gt;&lt;P&gt;--target-dir /diva/item_text \ &lt;/P&gt;&lt;P&gt;--m 1 \ &lt;/P&gt;&lt;P&gt;--fields-terminated-by '|' \ &lt;/P&gt;&lt;P&gt;--incremental append -check-column dw_modify_ts --last-value '2013-01-01 02:00:00'&lt;/P&gt;&lt;P&gt;Error Message:&lt;/P&gt;&lt;P&gt;Error: java.io.IOException: SQLException in nextKeyValue&lt;/P&gt;&lt;P&gt;Caused by: java.sql.SQLException: [Teradata Database] [TeraJDBC 15.00.00.20] [Error 6760] [SQLState HY000] Invalid timestamp.&lt;/P&gt;&lt;P&gt;Log Message:&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO tool.ImportTool: Incremental import based on column dw_modify_ts &lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO tool.ImportTool: Lower bound value: '2013-01-01 02:00:00' &lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO tool.ImportTool: Upper bound value: '2013-07-10 22:56:01.0' &lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO mapreduce.ImportJobBase: Beginning import of e2_item_category_text &lt;/P&gt;&lt;P&gt;Here as per above log sqoop giving milliseconds as well in Upper bound Value "'2013-07-10 22:56:01.0'?&lt;/P&gt;&lt;P&gt;I'm suspecting that this milliseconds format having an issue while importing data from Teradata.&lt;/P&gt;&lt;P&gt;Can you suggest me if you have any idea?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2016 11:22:14 GMT</pubDate>
    <dc:creator>divakarreddy_a</dc:creator>
    <dc:date>2016-06-22T11:22:14Z</dc:date>
    <item>
      <title>sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150739#M32598</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to run sqoop incremental imports from Teradata to HDFS but running into issues with time stamp.&lt;/P&gt;&lt;P&gt;my sqoop command:&lt;/P&gt;&lt;P&gt;sqoop import \ &lt;/P&gt;&lt;P&gt;--connect jdbc:teradata://PH/DATABASE=hadoop,CHARSET=UTF8 \ &lt;/P&gt;&lt;P&gt;--driver "com.teradata.jdbc.TeraDriver" \ &lt;/P&gt;&lt;P&gt;--username hadoop \ &lt;/P&gt;&lt;P&gt;--password Hadoop \ &lt;/P&gt;&lt;P&gt;--table item \ &lt;/P&gt;&lt;P&gt;--target-dir /diva/item_text \ &lt;/P&gt;&lt;P&gt;--m 1 \ &lt;/P&gt;&lt;P&gt;--fields-terminated-by '|' \ &lt;/P&gt;&lt;P&gt;--incremental append -check-column dw_modify_ts --last-value '2013-01-01 02:00:00'&lt;/P&gt;&lt;P&gt;Error Message:&lt;/P&gt;&lt;P&gt;Error: java.io.IOException: SQLException in nextKeyValue&lt;/P&gt;&lt;P&gt;Caused by: java.sql.SQLException: [Teradata Database] [TeraJDBC 15.00.00.20] [Error 6760] [SQLState HY000] Invalid timestamp.&lt;/P&gt;&lt;P&gt;Log Message:&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO tool.ImportTool: Incremental import based on column dw_modify_ts &lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO tool.ImportTool: Lower bound value: '2013-01-01 02:00:00' &lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO tool.ImportTool: Upper bound value: '2013-07-10 22:56:01.0' &lt;/P&gt;&lt;P&gt;16/06/22 04:13:43 INFO mapreduce.ImportJobBase: Beginning import of e2_item_category_text &lt;/P&gt;&lt;P&gt;Here as per above log sqoop giving milliseconds as well in Upper bound Value "'2013-07-10 22:56:01.0'?&lt;/P&gt;&lt;P&gt;I'm suspecting that this milliseconds format having an issue while importing data from Teradata.&lt;/P&gt;&lt;P&gt;Can you suggest me if you have any idea?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 11:22:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150739#M32598</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-06-22T11:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150740#M32599</link>
      <description>&lt;P&gt;I'm thinking that the value of '0000-00-00 00:00:00' date is stored in our db but can't be handled by the driver.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 11:29:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150740#M32599</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-06-22T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150741#M32600</link>
      <description>&lt;P&gt;Changed incremental to lastmodified "--incremental lastmodified" in sqoop script but still getting an error.&lt;/P&gt;&lt;P&gt;16/06/22 04:35:16 ERROR manager.SqlManager: SQL exception accessing current timestamp: java.sql.SQLException: [Teradata Database] [TeraJDBC 15.00.00.20] [Error 3706] [SQLState 42000] Syntax error: expected something between '(' and ')'.
java.sql.SQLException: [Teradata Database] [TeraJDBC 15.00.00.20] [Error 3706] [SQLState 42000] Syntax error: expected something between '(' and ')'.&lt;/P&gt;&lt;P&gt;ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not get current time from database&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 11:37:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150741#M32600</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-06-22T11:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150742#M32601</link>
      <description>&lt;P&gt;below script is running fine, then no issues with timestamp running scripts in Teradata, it seems issue with incremental or Upper value milliseconds format.&lt;/P&gt;&lt;P&gt;sqoop import \ &lt;/P&gt;&lt;P&gt;--connect jdbc:teradata://abc/DATABASE=hadoop,CHARSET=UTF8 \ &lt;/P&gt;&lt;P&gt;--driver "com.teradata.jdbc.TeraDriver" \ &lt;/P&gt;&lt;P&gt;--username hadoop \ &lt;/P&gt;&lt;P&gt;--password 00000 \ &lt;/P&gt;&lt;P&gt;--query "select * from text where dw_load_ts &amp;gt;='2016-01-01 00:00:00' AND \$CONDITIONS" \ &lt;/P&gt;&lt;P&gt;--target-dir /diva/text \ &lt;/P&gt;&lt;P&gt;--m 1&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 12:07:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150742#M32601</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-06-22T12:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150743#M32602</link>
      <description>&lt;P&gt;There appears to be &lt;A href="https://issues.apache.org/jira/browse/SQOOP-2402"&gt;a bug&lt;/A&gt; in Sqoop for lastmodified import from Teradata. Regarding "append" import can you try to use an INT column as "check-column".&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 12:22:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150743#M32602</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-06-22T12:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150744#M32603</link>
      <description>&lt;P&gt;Thanks Predrag. &lt;/P&gt;&lt;P&gt;it's working for "append" and INT column as "check-column"&lt;/P&gt;&lt;P&gt;another quick question:&lt;/P&gt;&lt;P&gt;Do we need to pass "--last -value" every time based on previous "Upper bound value:####"?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 13:04:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150744#M32603</guid>
      <dc:creator>divakarreddy_a</dc:creator>
      <dc:date>2016-06-22T13:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop incremental load failed with timestamp</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150745#M32604</link>
      <description>&lt;P&gt;Glad to hear it worked! Regarding "last-value" it's the best to create a Sqoop job, for example &lt;/P&gt;&lt;PRE&gt;sqoop job --create myjob -- import --connect jdbc:teradata ... &lt;/PRE&gt;&lt;P&gt;and then just execute "sqoop job --exec myjob" every time. Sqoop will memorize last-value in its internal storage. For a "lastmodified" example see the answer to &lt;A href="https://community.hortonworks.com/questions/10710/sqoop-incremental-import-working-fine-now-i-want-k.html"&gt;this post&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 14:28:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sqoop-incremental-load-failed-with-timestamp/m-p/150745#M32604</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-06-22T14:28:00Z</dc:date>
    </item>
  </channel>
</rss>

