I have a table with 10years of records. I have to import the table with 1year(01-Jan-2010 to 31-Dec-2010) records every time. How to pass these date ranges as arguments to the sqoop shell script.
Have you been able to get this working? If you have received the info, you can use something like the below command to get the data based on the date range
querytorun="select * from <TABLENAME> where date>= $mindate and date<= $maxdate"
querytorun+=" and \$CONDITIONS"
sqoop import --connect jdbc:mysql://<DPIPADDRESS>/<DBNAME> --username <USERNAME> --password <PASSWORD> --query "$querytorun" --split-by "<SPLITBYKEY>" --delete-target-dir ......