I just tried simple sqoop import just to create Hive table using target-dir.
Sqoop import did not create hive table in the target-dir path I gave in my query. Instead it created in the default path /user/hive/warehouse.
Example: I have retail_ods.db in the path /user/hive/warehouse. I want to import table departments from mysql to Hive using sqoop import. When I use --target-dir /user/hive/warehouse/retail_ods.db/departments. Sqoop import did not create departments table under the target directory path, but created under default path /user/hive/warehouse
Does target-dir not work to create hive table in a specified directory?. Purpose of this query is to understand target-dir option to create hive table during sqoop import.