一、项目实战
1.链接hive库
创建数据库
create database if not exists text;
use text;
创建表
create table if not exists fwzh(
time string comment'消息时间',
output_name string comment'发件人呢称',
output_no string comment'发件人账号',
output_sex string comment'性别',
output_ip string comment'发件人IP',
output_system string comment'发件人系统',
output_phone string comment'发件人手机型号',
output_net string comment'发件人网络制式',
output_gps string comment'发件人GPS',
input_name string comment'收件人称',
input_ip string comment'收件人IP',
input_no string comment'收件人账号',
input_system string comment'收件人系统',
input_phone string comment'收件人手机型号',
input_net string comment'收件人网络制式',
input_gps string comment'收件人GPS',
input_sex string comment'收件人性别',
news_type string comment'消息类型',
distance string comment'双方距离',
news string comment'消息');
导入本地数据
load data local inpath '/export/data/chat_data-10W.csv' into table fwzh;