Warehouse-dir or target-dir during exam


#1

Hi All,

This question is regarding --warehouse-dir and --target-dir option.

If a target path like /user/cloudera/prob1/solution is specified in a sqoop related problem in exam. in such case should we use --target- dir and export the data in the specified directory or should we use --warehouse-dir which will create a sub-directory with the name of table.

which one will be the correct option to choose.

Please advise.

Thanks
Abhishek


Prepare for certifications on our state of the art labs which have Hadoop, Spark, Kafka, Hive and other Big Data technologies

  • Click here for signing up for our state of the art 13 node Hadoop and Spark Cluster


#2

You can check the location before running the sqoop command. If the directory already exists in the hdfs then you can use target directory if not use ware house directory.


#3

In my opinion the best approach would be to use --target-dir unless you are asked to import all tables and copy paste the target directory as they expect the answer in the same directory which is provided in the question.