Questions and Answers

How to access Sqoop in CloudxLab?

Please use the syntax given below to access Sqoop after logging into CloudxLab web console.

  • Sqoop List Databases

    sqoop list-databases --connect "jdbc:mysql://mysql_host:3306" --username mysql_user_name -P

    Enter mysql_password when prompted. You can find mysql_host, mysql_user_name and mysql_password inside "MySQL Credentials" section under "My Lab".

    Some thing like this command should work

    sqoop list-databases --connect "jdbc:mysql://ip-172-31-20-247:3306" --username sqoopuser -P
  • Sqoop Import

    Lets say your username is john8204 and you want to import orders table from retail_db database into retail_db_orders directory inside your home directory in HDFS. Please run below command

    sqoop import --connect "jdbc:mysql://ip-172-31-20-247:3306/retail_db" --table orders --username=sqoopuser -P --target-dir /user/john8204/retail_db_orders

You can also go through below videos on Sqoop from our partners