在hive命令终端直接导入文本数据:
hive> load data local inpath '/home/simon/hive_test/a.txt' overwrite into table w_a;
查看特征:
hive> select a.usrid, a.age, b.time from w_a a join w_b b on a.usrid = b.usrid;
通过load命令直接将hadoop文件系统上的文件导入,不加local
hive> load data inpath '/user_name.data.utf.txt' overwrite into table u_info;
hive数据导入另外一种方法:
hive> insert into table w_d select usrid, age from w_a limit 2;
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!
网友评论