说明:此篇文章环境基于【Hadoop(二、Hive(数据仓库)搭建)】,请先阅读上一篇文章并搭建好环境。
1、启动hive
nohup /export/server/apache-hive-3.1.2-bin/bin/hive --service metastore &
nohup /export/server/apache-hive-3.1.2-bin/bin/hive --service hiveserver2 &
当前路径下查看日志:cat nohup.out
2、安装、配置dataGrid
2.1、下载并安装dataGrid
2.2、配置datasource
2.3、datasource中添加信息
2.4、驱动修改
2.4.1、点击【Apache Hive】
2.4.2、删除自带的Driver Files内容,添加用户自己下载的hive-jdbc-3.1.2-standalone.jar包
hive-jdbc-3.1.2-standalone.jar在/export/server/apache-hive-3.1.2-bin/jdbc下拷贝
2.5、测试连接
2.6、准备数据
下载地址:https://codeload.github.com/Rango-2017/Pandas_exercises/zip/master
解压之后取chipotle.tsv
2.7、建表
根据2.6中chipotle.tsv的表头建库建表
create database chipotledatabase;use chipotledatabase;create table chipotle ( order_id int COMMENT 'id', quantity int COMMENT '质量', item_name string COMMENT '名称', choice_description string COMMENT '描述', item_price string COMMENT '价格')row format delimitedfields terminated by " "; // 字段之间分隔符
2.8、加载数据
2.8.1、将2.6中的chipotle.tsv去掉表头信息的文件上传到192.168.137.129虚拟机的根目录(与export同级)
2.8.2、在dataGrid中加载数据并查询
//加载数据load data local inpath '/chipotle.tsv' into table chipotledatabase.chipotle;select * from chipotle; // 查询数据
3、安装FineBI
3.1、官网下载并安装FineBI
3.2、FineBI与hive连接驱动下载
下载地址:https://help.fanruan.com/finebi/doc-view-301.html
解压之后获取五个jar包
将这五个jar包拷贝到FineBI安装目录下:D:\fineBI\install\FineBI5.1\webapps\webroot\WEB-INF\lib
3.3、安装驱动包隔离插件
下载地址:https://help.fanruan.com/finebi/doc-view-697.html
安装此插件
3.4、3.2和3.3完成之后重启FineBI
3.5、连接hive
3.6、数据准备
3.7、构建可视化图表
4、说明
FineBI使用步骤较多,复杂。操作步骤只有截图,用户可自己摸索。
留言与评论(共有 0 条评论) “” |