Durga Gadiraju

194.Sqoop Import – “import-all-tables”

To refer to information related to import-all-tables command Sqoop help import-all-tables Command to delete directory in hdfs hadoop fs -rm -R /user/training/sqoop_import/retail_db Command to get list of tables sqoop list-tables –connect jdbc:mysql://ms.itversity.com:3306/retail_db –username retail_user –password itversity Command to import all tables at once sqoop import-all-tables –connect jdbc:mysql://ms.itversity.com:3306/retail_db –username retail_user –password itversity –warehouse-dir /user/training/sqoop_import/retail_db –autoreset-to-one-mapper –num-mappers …

194.Sqoop Import – “import-all-tables” Read More »

193.Sqoop Import – Dealing with NULL Values

Command to deal with null values in a numeric column in a table while importing data sqoop import –connect jdbc:mysql://ms.itversity.com:3306/hr_db –username hr_user –password itversity –table employees –warehouse-dir /user/training/sqoop_import/hr_db –delete-target-dir –null-non-string “-1” Command to validate files created hadoop fs -get /user/training/sqoop_import/hr_db/employees . view part-m-00000

192.Sqoop Import – Specifying Delimiters – Import NYSE Data with \t as delimiter

Command to import data by specified delimiters sqoop import –connect jdbc:mysql://ms.itversity.com:3306/retail_db –username retail_user –password itversity –table orders –warehouse-dir /user/training/sqoop_import/retail_db –delete-target-dir –fields-terminated-by ‘|’ –lines-terminated-by ‘:’ Command to delete directory if it exists in local system rm -rf orders Command to get files from hdfs to local system hadoop fs -get /user/training/sqoop_import/retail_db/orders . Command to view the …

192.Sqoop Import – Specifying Delimiters – Import NYSE Data with \t as delimiter Read More »