I am using Cloudera-VM and while using sqoop import to load data in HDFS with a mentioned target -dir, it is repeatedly importing the data to the default HDFS location and ignoring the target directory mentioned in sqoop command.
Sqoop command i am using with SQL server:
sqoop import --connect "jdbc:sqlserver://hostname;database=DBname;username=anyusername;password=mypassword" --table Person -- --schema Person --m 1 --target-dir /user/hdfs/abhi1/newdir
After running the above command, the output is dumped in /user/cloudera/Person directory and not to the "/user/hdfs/abhi1/newdir".
Also if I use --append command since i am running the import command more than once it says Person file already exists at location /user/cloudera/Person