Kettle导出mysql数据到hive
通过Kettle导出mysql数据到hive有两种方案:
1. 将hive表直接作为表输出进行
- 先将数据上传到hdfs,然后执行SQL语句load到hive
具体步骤如下:
(1)将hive安装目录下,lib里面的所有hive开头的jar包转移至kettle的大数据jar包目录下
data-integration\plugins\pentaho-big-data-plugin\hadoop-configurations\hdp25\lib
(2) 修改kettle的plugin.properties文件
plugins/pentaho-big-data-plugin/plugin.properties
(3)启动hive,连接hive Server 2(对于直接连接hive)
如果是apache hive
bin/hive --service metastore &
bin/hive --service hiveserver2 &
如果是cdh hive 可以直接