hbase shell create 'OccupationsData', 'code', 'description', 'total_emp', 'salary' exit hive CREATE EXTERNAL TABLE Occupations (key STRING, description STRING, total_emp int, salary int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED BY 'org.apache.hadoop.hive.hbase.HBa seStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mappin g" = ":key, description:description,total_emp:total_emp,salary :salary") TBLPROPERTIES("hbase.table.name"="OccupationsData"); hbase.org.apache.hadoop.hbase.mapreduce.ImportTsv '-Dimporttsv.separator=,' -Dimporttsv.columns=HBASE_ROW_KEY, details:code,details:description,details:total_emp,details:salary OccupationsData /home/cloudera/occupations.csv; impala-shell invalidate metadata [[default.]Occupations] SELECT description, salary FROM Occupations ORDER BY salary DESC LIMIT 10; SELECT description, salary/total_emp AS PerPersonSalary FROM Occupations ORDER BY PerPersonSalary DESC LIMIT 10; SELECT SUM(salary)/SUM(total_emp) AS AvgSalary FROM occupationsIncomeHBase WHERE description LIKE '%computer%'; SELECT code, description, salary FROM Occupations WHERE Salary IN (SELECT MAX(salary) FROM Occupations);