Apache sqoop is a tool which is used to transfer data between RDBMS and HDFS. We use import command to transfer data from RDBMS to HDFS and Export command to transfer data from HDFS to RDBMS.
Import command
For Detail Click HereImport-all-tables
We use target-dir in sqoop to load data in given target directory but this directory will not be created earlier. If it is already created then we will get an exception. But in case of warehouse-dir if given directory is available then it will treat this directory as a parent directory and will create new child directory in it and load the data.
For Detail Click HereWe use export command
By default it will take comma(,) as a field separator. We can also change it by using - -fields-terminated-by option in sqoop while loading the data.