Skip to main content

Command Palette

Search for a command to run...

Apache Sqoop References

Updated
•1 min read
Apache Sqoop References
S

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.

🚨 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