第1关 step1/query.sh #********* Begin *********# echo " create database if not exists test1; create table if not exists test1.student(Sno INT,name STRING,age INT,sex STRING,score STRUCT); create view student_view as select Sno,name,age,sex,score from test1.student; alter view student_view rename to student_info_views; drop view if exists student_info_views; " #********* End *********# 第2关 step2/query.sh #********* Begin *********# echo " create database if not exists test2; create table if not exists test2.student(Sno INT,name STRING,age INT,sex STRING,score STRUCT) row format delimited fields terminated by ',' collection items terminated by '-'; load data local inpath '/home/student.txt' overwrite into table student; create index student_index on table student(Sno) as 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' with deferred rebuild in table student_index_table; drop index if exists student_index on student; " #********* End *********#