启动服务
nohup ./hive --service metastore &
nohup ./hive --service hiveserver2 &
进入beeline
./beeline
!connect jdbc:hive2://192.168.33.201:10000
建表语句
create table student(
num int,
name string,
sex string,
age int,
dept string
)
row format delimited fields terminated by ",";
加载本地数据
复制操作
load data local inpath '/root/student.txt' into table student_local;
加载HDFS中的数据
移动操作
load data inpath '/student.text' into table student_hdfs;