- Command to import data into hive table with log files
sqoop import --connect jdbc:mysql://ms.itversity.com:3306 --username retail_user --password itversity --table orders --hive-import --hive-database training_sqoop_retail --hive-overwrite --verbose 2>sqoopimport.err 1>sqoopimport.out
- Command to get list of files as specified
Is -Itr sqoopimport.*
- To view file
view sqoopimport.err
- Command to import data into hive table with log files without using hive overwrite command
sqoop import --connect jdbc:mysql:mysql://ms.itversity.com:3306/retail_db --username retail_user --password itversity --table orders --hive-import --hive-database training_sqoop_retail --verbose 2>sqoopimport.err 1>sqoopimport.out
- Command to import data into hive table with log files and create-hive-table command
sqoop import --connect jdbc:mysql://ms.itversity.com:3306/retail_db --username retail_user --password itversity --table orders --hive-import --hive-database --create-hive-table --verbose 2>sqoopimport.err 1>sqoopimport.out