<?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 Re: Is it possible to do an incremental import using Sqoop? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123786#M86530</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2769/rushikeshdeshmukh007.html" nodeid="2769"&gt;@Rushikesh Deshmukh&lt;/A&gt; &lt;/P&gt;&lt;P&gt;See this &lt;A href="https://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html#_incremental_imports" target="_blank"&gt;https://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html#_incremental_imports&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sqoop provides an incremental import mode which can be used to retrieve only rows newer than some previously-imported set of rows.&lt;/P&gt;&lt;P&gt;The following arguments control incremental imports:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 4. Incremental import arguments:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH&gt;Argument&lt;/TH&gt;&lt;TH&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;CODE&gt;--check-column (col)&lt;/CODE&gt;&lt;/TD&gt;&lt;TD&gt;Specifies the column to be examined when determining which rows to import.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;CODE&gt;--incremental (mode)&lt;/CODE&gt;&lt;/TD&gt;&lt;TD&gt;Specifies how Sqoop determines which rows are new. Legal values for &lt;CODE&gt;mode&lt;/CODE&gt; include &lt;CODE&gt;append&lt;/CODE&gt; and &lt;CODE&gt;lastmodified&lt;/CODE&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;CODE&gt;--last-value (value)&lt;/CODE&gt;&lt;/TD&gt;&lt;TD&gt;Specifies the maximum value of the check column from the previous import.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Sqoop supports two types of incremental imports: &lt;CODE&gt;append&lt;/CODE&gt; and &lt;CODE&gt;lastmodified&lt;/CODE&gt;. You can use the &lt;CODE&gt;--incremental&lt;/CODE&gt; argument to specify the type of incremental import to perform.&lt;/P&gt;&lt;P&gt;You should specify &lt;CODE&gt;append&lt;/CODE&gt; mode when importing a table where new rows are continually being added with increasing row id values. You specify the column containing the row’s id with &lt;CODE&gt;--check-column&lt;/CODE&gt;. Sqoop imports rows where the check column has a value greater than the one specified with &lt;CODE&gt;--last-value&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;An alternate table update strategy supported by Sqoop is called &lt;CODE&gt;lastmodified&lt;/CODE&gt; mode. You should use this when rows of the source table may be updated, and each such update will set the value of a last-modified column to the current timestamp. Rows where the check column holds a timestamp more recent than the timestamp specified with &lt;CODE&gt;--last-value&lt;/CODE&gt; are imported.&lt;/P&gt;&lt;P&gt;At the end of an incremental import, the value which should be specified as &lt;CODE&gt;--last-value&lt;/CODE&gt; for a subsequent import is printed to the screen. When running a subsequent import, you should specify &lt;CODE&gt;--last-value&lt;/CODE&gt; in this way to ensure you import only the new or updated data. This is handled automatically by creating an incremental import as a saved job, which is the preferred mechanism for performing a recurring incremental import. See the section on saved jobs later in this document for more information.&lt;/P&gt;</description>
    <pubDate>Sat, 12 Mar 2016 19:24:31 GMT</pubDate>
    <dc:creator>nsabharwal</dc:creator>
    <dc:date>2016-03-12T19:24:31Z</dc:date>
    <item>
      <title>Is it possible to do an incremental import using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123785#M86529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone know if, Is it possible to do an incremental import using Sqoop? If yes, How?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 19:23:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123785#M86529</guid>
      <dc:creator>rushikeshdeshmu</dc:creator>
      <dc:date>2016-03-12T19:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do an incremental import using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123786#M86530</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2769/rushikeshdeshmukh007.html" nodeid="2769"&gt;@Rushikesh Deshmukh&lt;/A&gt; &lt;/P&gt;&lt;P&gt;See this &lt;A href="https://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html#_incremental_imports" target="_blank"&gt;https://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html#_incremental_imports&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sqoop provides an incremental import mode which can be used to retrieve only rows newer than some previously-imported set of rows.&lt;/P&gt;&lt;P&gt;The following arguments control incremental imports:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 4. Incremental import arguments:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH&gt;Argument&lt;/TH&gt;&lt;TH&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;CODE&gt;--check-column (col)&lt;/CODE&gt;&lt;/TD&gt;&lt;TD&gt;Specifies the column to be examined when determining which rows to import.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;CODE&gt;--incremental (mode)&lt;/CODE&gt;&lt;/TD&gt;&lt;TD&gt;Specifies how Sqoop determines which rows are new. Legal values for &lt;CODE&gt;mode&lt;/CODE&gt; include &lt;CODE&gt;append&lt;/CODE&gt; and &lt;CODE&gt;lastmodified&lt;/CODE&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;CODE&gt;--last-value (value)&lt;/CODE&gt;&lt;/TD&gt;&lt;TD&gt;Specifies the maximum value of the check column from the previous import.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Sqoop supports two types of incremental imports: &lt;CODE&gt;append&lt;/CODE&gt; and &lt;CODE&gt;lastmodified&lt;/CODE&gt;. You can use the &lt;CODE&gt;--incremental&lt;/CODE&gt; argument to specify the type of incremental import to perform.&lt;/P&gt;&lt;P&gt;You should specify &lt;CODE&gt;append&lt;/CODE&gt; mode when importing a table where new rows are continually being added with increasing row id values. You specify the column containing the row’s id with &lt;CODE&gt;--check-column&lt;/CODE&gt;. Sqoop imports rows where the check column has a value greater than the one specified with &lt;CODE&gt;--last-value&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;An alternate table update strategy supported by Sqoop is called &lt;CODE&gt;lastmodified&lt;/CODE&gt; mode. You should use this when rows of the source table may be updated, and each such update will set the value of a last-modified column to the current timestamp. Rows where the check column holds a timestamp more recent than the timestamp specified with &lt;CODE&gt;--last-value&lt;/CODE&gt; are imported.&lt;/P&gt;&lt;P&gt;At the end of an incremental import, the value which should be specified as &lt;CODE&gt;--last-value&lt;/CODE&gt; for a subsequent import is printed to the screen. When running a subsequent import, you should specify &lt;CODE&gt;--last-value&lt;/CODE&gt; in this way to ensure you import only the new or updated data. This is handled automatically by creating an incremental import as a saved job, which is the preferred mechanism for performing a recurring incremental import. See the section on saved jobs later in this document for more information.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 19:24:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123786#M86530</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-03-12T19:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do an incremental import using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123787#M86531</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/140/nsabharwal.html"&gt;Neeraj Sabharwal&lt;/A&gt;, thanks for quick reply.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 19:27:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123787#M86531</guid>
      <dc:creator>rushikeshdeshmu</dc:creator>
      <dc:date>2016-03-12T19:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do an incremental import using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123788#M86532</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.hortonworks.com/users/140/nsabharwal.html"&gt;Neeraj Sabharwal&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/140/nsabharwal.html"&gt;Neeraj Sabharwal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/2769/rushikeshdeshmukh007.html"&gt;Rushikesh Deshmukh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This are the steps i followed for incremental import in sqoop for hbase table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Importing a Table To HBase&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop import --connect "jdbc:sqlserver://x.x.x.x:1433;database=test" --username sa -P --table employee --hbase-table employee --hbase-create-table --column-family cf --hbase-row-key id -m 1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQOOP HBASE INCREMENTAL IMPORT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop import --connect "jdbc:sqlserver://x.x.x.x:1433;database=test" --username sa -P --table employee --incremental append --check-column id --last-value 71 -m 1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQOOP JOB CREATION FOR HBASE INCREMENT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop job --create incjobsnew -- import --connect "jdbc:sqlserver://x.x.x.x:1433;database=test" --username sa -P --table employee --incremental append --check-column id --last-value 71 -m 1.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When i execute sqoop job&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop job --exec incjobsnew.&lt;/P&gt;&lt;P&gt;Sqoop command runs successfully and it show the exact number of records retrieved successfully. When i check in hbase for the records. It doesn't show the retrieved results.&lt;/P&gt;&lt;P&gt;Could you tell where is the mistake done.&lt;/P&gt;&lt;P&gt;I need to automate this sqoop job in Oozie to run a particular time interval daily.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 14:21:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-do-an-incremental-import-using-Sqoop/m-p/123788#M86532</guid>
      <dc:creator>r_mageshkumar</dc:creator>
      <dc:date>2016-10-27T14:21:06Z</dc:date>
    </item>
  </channel>
</rss>

