Sqoop import using default HDFS location to import...
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.
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