iceberg整合hive(从hive读取iceberg表数据)实践02

更新时间:2023-06-29 18:46:39 阅读: 评论:0

iceberg整合hive(从hive读取iceberg表数据)实践02⽬录
实现⽬标:
在hive查询iceberg表数据
1,创建hadoop catalog
在zeppelin 创建hadoop catalog
CREATE CATALOG hadoop_catalog WITH (
'type'='iceberg',
'catalog-type'='hadoop',
'warehou'='hdfs://bi-524:8020/tmp/warehou',
'property-version'='1'
);
注意点: 'warehou'='hdfs://bi-524:8020/tmp/warehou',
如图:
雷锋叔叔手抄报
2,创建基于hadoop_catalog的iceberg表
CREATE TABLE st.iceberg_hive (涧字怎么读
id BIGINT,
name STRING
高级讽刺人的话);
注意:
st.iceberg_hive
“hadoop_catalog”是上⾯创建的hadoop catalog名字 ,“test”是hive对应的test库,iceberg_hive是表名字
iceberg_hive不需要我们创建
如果这⾥报错,需要⼿动创建test库,我这⾥本⾝就存在⼀个test库,所以不演⽰了。
3,从hadoop_catalog来创建hive表,在hive shell执⾏
千句文1,添加jar :
在hive shell :
add jar /path/to/iceberg-hive-runtime.jar;
2,设置参数:
在hive shell :
SET abled=true;
abled=true;
atalog=hive;
3,创建hive表:
在hive shell 客户端执⾏:
CREATE EXTERNAL TABLE test.iceberg_hive(
`id` int,
`name` string)
STORED BY 'org.hive.HiveIcebergStorageHandler'
LOCATION 'hdfs://bi-524:8020/tmp/warehou/test/iceberg_hive'
TBLPROPERTIES (
'atalog'='hadoop',
'atalog.hadoop.warehou.location'='hdfs://bi-524:8020/tmp/warehou/test/iceberg_hive'  );
其实我爱你注意:这⾥的hdfs地址⼀定要精确到 catalog地址 / 库 / 表
感恩父母的演讲稿
如果执⾏不报错,成功的话,我们可以去hdfs web端看到效果:重要的的英语
4,向iceberg插⼊数据验证
zeppelin执⾏:
INSERT INTO st.iceberg_hive values(2, 'c');
凉拌莲藕片的做法5,hive查询

本文发布于:2023-06-29 18:46:39,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1060473.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:数据   需要   父母   莲藕   手抄报   设置   看到
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图