Apache Sqoop References
Sudheer Paturi
1 min read
🚨 I'm writing this blog as a reference to myself regarding all things related to databases. If you find the content a bit unstructured or if it doesn't make sense that's the reason why.
Export data from Hadoop to the MySQL database using Sqoop
sqoop export \
--connect jdbc:mysql://<Public DNS>:3306/<database name>\
--table <table name> \
--username root --password 123 \
--export-dir /user/root/<database directory> \
--fields-terminated-by ',' --lines-terminated-by '\n'
Import data into the HDFS cluster from MySQL tables
sqoop import \
--connect jdbc:mysql://<Public DNS>:3306/<database name> \
--table <table name> \
--username root --password 123 \
--target-dir /user/root/<HDFS directory> \
-m 1
0
Subscribe to my newsletter
Read articles from Sudheer Paturi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sudheer Paturi
Sudheer Paturi
I’m currently learning Full-Stack Web Development. I use this blog as a reference for to all my notes related to the topics I study.