HIVE数据分析-导入数据库

题目:1、数据导入:
要求将样表文件中的(sales_sample_20170310)数据导入HIVE数据仓库中。

首先,启动hadoop以及hive

出现以上进程,显示成功

将改名后的文件上传到虚拟机

在hive里面的defaul数据库创建表格

use default;

show tables;

load data local inpath '/export/server/apache-hive-3.1.2-bin' into table sales;

将表格数据导入到表格中

create table sales(day_id string,sale_nbr string,buy_nbr string,cnt string,round string) row format delimited fields terminated by ',';

查询数据

select * from sales;

posted @ 2023-09-22 12:15  YE-  阅读(23)  评论(0编辑  收藏  举报