Search code examples
hadoophivesqoophadoop-streamingsqoop2

Loading last 3 days incremental data from oracle to hdfs using sqoop


How to import last 3 days incremental data from oracle to hdfs using Sqoop.

Currently i have written generic sqoop command using Shell-Script to import data from multiple oracle database for multiple plants.

So can anyone help me how to write sqoop command to import the last 3 days data.


Solution

  • In your SQOOP job you can issue SQL so in your SQL statement you can add a date function to the Where clause assuming the table you are pulling from has a date column.

    Example: select ,,... from where >= (CURRENT-DATE -3);