Uncategorized

209.Creating Table in MySQL

Command to get list of tables SHOW tables; Command to get meta-data on table DESCRIBE daily_revenue; Command to connect to my sql mysql -u retail_user -h ms.itversity.com -p Command to get list of databases show databases; Command to connect to a database USE retail_export; Command to create table CREATE TABLE training_daily_revenue (order_date VARCHAR(25) PRIMARY KEY,revenue …

209.Creating Table in MySQL Read More »

202.Sqoop Import – Understanding Execution Flow while importing into Hive Table

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 …

202.Sqoop Import – Understanding Execution Flow while importing into Hive Table Read More »

201.Sqoop Import – Managing Table using Hive Import – Error out – create-hive-table

Command to import table into hive and give error if table already exists sqoop import –connect jdbc:mysql://ms.itversity.com:3306/retail_db –username retail_user –password itversity –table orders –hive-import –hive-database training_sqoop_retail –create-hive-table To validate files in directory hadoop fs -Is /user/training/orders Command to remove files in directory hadoop fs -rm -R /user/training/orders Command to import data into hive sqoop import …

201.Sqoop Import – Managing Table using Hive Import – Error out – create-hive-table Read More »