Sqoop quick help


I am able to use sqoop to move data in/out using export/import command. My question is that can we use sqoop to move data from mysql to localfile system in VM.
My objective is to generate source file in localfile system. I am using Cloudera VM. As internet is not enabled in VM, I thought of using mysql data extract. One workaround I am thinking is to move data from mysql to hdfs, and move from hdfs to localfile system. Is there any other way to get this done?



@ashishsinha.1984 I highly doubt it because Sqoop (DB) import to HDFS only possible. If you want to create local source system files then please rely upon the mysql table export


And alos I remember that there is a video where Durga (Itversity) posted a video on the same especially on the CCA-175 playlist.

Hope it helps.


The approach mentioned by you for getting data from database to HDFS and then sending the data from HDFS to local file system using get command can be a solution to this. You can go for a shell script so that every time you perform this operation, the files are deleted from hdfs once they are send to the local file system.

Here is a sample script: