Imagine, if you have a system where you are producing huge volume of data, and you want to extract some part of the data and do some analysis such. You wish to view the results of such analysis quite often. You can't use a Hadoop system to have quick views of your data. So a possible work flow for such a problem can be :-Capture data into HDFS - > Analyze data with Map Reduce- >HDFS to RDBMS
The benefit of using this kind of work flow is based on simple fact that Hadoop systems are not for quick reads whereas an RDBMS system can effectively resolve the problem of quick reads. We are using the MapReduce paradigm to turn our raw data to substantial information (may be usually at the end of day using some batch process) and finally pushing it into an RDBMS system for display purpose.
Sqoop can play a vital role here, if we are facing a problem similar to above mention work flow.
Typical Workflows:-
1. RDBMS to HDFS - Analyze data with Map Reduce- HDFS to RDBMS
2. RDBMS to Hive/Habase- Analyze data with HQL-HIve To RDMS
3. NoSql to HDFS/Hive/Hbase- Analyze with HQL/MR - HDFS/Hive/Hbase
Working of Sqoop in this whole process of Big Data Analytics:
1 .When we try to use any sqoop tools.Sqoop will communicate with the database store , it will fetch meta-data information from RDBMS. Sqoop will use this meta data for generating the java class.
2. Sqoop gets the metadata from DB store.
3. Sqoop will internally create a java class using JDBC API. Sqoop will compile the java class using JDK and create a .class file.A .jar file will be created from . class file.
4. After creating the jar files, sqoop will try to communicate with DB store again, and will try to find out the split column. Based on te split column Sqoop will fetch the data from DB
5. Finallly, Sqoop places the retrieved data into HDFS.