- Command to get list of tables in retail_db database
sqoop list-tables --connect jdbc:mysql://ms.itversity.com:3306/retail_db --username retail_user --password itversity
- Command to get schema information on table order_items_nopk
sqoop eval --connect jdbc:mysql://ms.itversity.com:3306/retail_db --username retail_user --password itversity --query "DESCRIBE order_items_nopk"
- Command to import data from table with no primary key
sqoop import --connect jdbc:mysql://ms.itversity.com:3306/retail_db --username retail_user --password itversity --table order_items_nopk --warehouse-dir /user/training/sqoop_import/retail_db --split-by order_item_id --delete-target-dir
- Command to import data from table with no primary key using num-mappers
sqoop import --connect jdbc:mysql://ms.itversity.com:3306/retail_db --username retail_user --password itversity --table order_items_nopk --warehouse-dir /user/training/sqoop_import/retail_db --num-mappers 1 --delete-target-dir