head -n 5 visits_data.txt
cat visits.hive
[root@master exercise]#
head -n 5 visits_data.txt
BUCKLEY SUMMER 10/12/2010 14:48 10/12/2010 14:45 WH
CLOONEY GEORGE 10/12/2010 14:47 10/12/2010 14:45 WH
PRENDERGAST JOHN 10/12/2010 14:48 10/12/2010 14:45 WH
LANIER JAZMIN 10/13/2010 13:00 WH BILL SIGNING/
MAYNARD ELIZABETH 10/13/2010 12:34 10/13/2010 13:00 WH BILL SIGNING/
[root@master exercise]#
cat visits.hive
--cat visits.hive
create table people_visits (
last_name string,
first_name string,
arrival_time string,
scheduled_time string,
meeting_location string,
info_comment string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t' ;
建表语句不知道什么意思
[root@master ~]# ./hive -f /opt/visits.hive
bash: ./hive: No such file or directory
hive> ./hive -f /opt/exercise/visits.hive
> ;
NoViableAltException(17@[])
hive> -f /opt/exercise/visits.hive
> ;
NoViableAltException(299@[])
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1074)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:397)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:309)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1145)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1193)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1082)