Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Re: Sqoop --incremental lastmodified --last-value

Copy link to this message
Re: Sqoop --incremental lastmodified --last-value
Hey there,

Sqoop returns the current timestamp. If you look closely at the bounding
query, it uses whatever is supplied in "--last-value" as the lower boundary
and the current system time as the upper boundary:

sqoop import --connect "jdbc:mysql:///test" --table lastmod --incremental
lastmodified --check-column created --last-value "2014-08-08 11:19:41.0" ...

14/08/08 14:45:10 INFO db.DataDrivenDBInputFormat: BoundingValsQuery:
SELECT MIN(`id`), MAX(`id`) FROM `lastmod` WHERE ( `created` >= '2014-08-08
11:19:41.0' AND `created` < '2014-08-08 14:45:08.0' )

In the above example, 2014-08-08 11:19:41.0 is the lower boundary or the
supplied "--last-value". Also, 2014-08-08 14:45:08.0 was the current system
time at the time of running the script.
On Fri, Aug 8, 2014 at 2:18 PM, Vikash Talanki -X (vtalanki - INFOSYS
LIMITED at Cisco) <[EMAIL PROTECTED]> wrote: