Is there any way to load data from MySql to HDFS?

0 votes

I have data present in MySql table. What I want is to import this data to HDFS. I found that there is a tool called Sqoop, used to import data from MySql but how to use Sqoop or how to write a command to load data from MySql to HDFS?

Can anyone please help me out??

Apr 10, 2018 in Big Data Hadoop by coldcode
• 2,020 points
602 views

1 answer to this question.

0 votes

The generic command i.e used to import data from MySql to HDFS is as shown in below image:

image

Now, to understand import function, let us take an example:

Suppose we have to import the given below table to HDFS. 

image

So the command for importing this table to HDFS will be:

sqoop import --connect jdbc:mysql://sqoopdb.edu.cloudlab.com/userdb --username labuser --password edureka --table emp –m 1 --target-dir ‘/user/edureka_249489/sqoop_sql/’;

I hope this will give you some idea about how to import data from MySql to HDFS.

answered Apr 10, 2018 by nitinrawat895
• 10,690 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

Is there any way to setup Hadoop nodes (data nodes/namenodes) to use multiple volumes/disks?

Datanodes can store blocks in multiple directories ...READ MORE

answered Jun 20, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
174 views
0 votes
1 answer

Is there any way to increase Java Heap size in Hadoop?

You can add some more memory by ...READ MORE

answered Apr 12, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
1,029 views
0 votes
1 answer

Is there any way to write "map only" Hadoop jobs ?

You can easily set the number of ...READ MORE

answered Apr 16, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
55 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
1,102 views
0 votes
1 answer

How to move data from Oracle database to Hadoop?

Yes, you heard it correctly. Apache Sqoop is ...READ MORE

answered Apr 11, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
2,020 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
3,012 views
0 votes
1 answer

How to get started with Hadoop?

Well, hadoop is actually a framework that ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by coldcode
• 2,020 points
95 views
0 votes
1 answer

Is there any way to pull data from Mainframe to Hadoop?

First of all, COBOL is a programming ...READ MORE

answered May 21, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
843 views
0 votes
1 answer