Sqoop --target-dir & ---warehouse-dir
Sqoop store imported data by 2 way: When we import record from RDBMS to HDFS using Sqoop then Sqoop use two way to store imported record on HDFS. 1. --target-dir directory path here 2. --warehouse-dir directory path here Import data using --target-dir in Sqoop: By using --target-dir path of directory, Sqoop create a directory which work as table name (directory path) with imported files. Example -1: Sqoop import --connect jdbc:mysql://localhost/sales --username root --password password --table students --target-dir /user/YT/tarData --where country_name = ‘India’ -m 1 This import statement stored all those students in target directory location, who belongs to India. Import data using --warehouse-dir in Sqoop: Sqoop create a directory which works as database directory and table name directory automatically created with imported files with in warehouse dir . So warehouse directory work like database directory for importing table. Example: Sqoop import --connect ...