一、Zeppelin集成iceberg
- Zeppelin支持Flink SQL
- Flink SQL支持iceberg
- Zeppelin集成Flink SQL后,就可以在Zeppelin上创建iceberg表了
下面演示下Zeppelin集成iceberg后,创建表,插入数据的方便性。文章来源地址https://www.toymoban.com/news/detail-515808.html
二、查看catalog
show catalogs;
default_catalog
hive
iceberg
三、使用数据库
use debeziumtest;
四、查看表
show tables;
productinfo
五、创建表
CREATE TABLE `productInfo` (
`id` int,
`productId` string,
`name` string,
`description` string,
`weight` float
)
六、插入数据
insert into iceberg.ods_stg.productInfo values(2,'1206827245738502144','scooter','Small 2-wheel scooter',3.14);
七、查询数据
select * from productInfo
2 1206827245738502144 scooter Small 2-wheel scooter 3.140000104904175
八、创建分区表
CREATE TABLE `stu` (id int,name string, age int)
PARTITIONED BY (age)
九、分区表插入数据
insert into stu values(3,'杀sheng',16),(4,'鸣人',19)
十、查询分区表数据
select * from stu
4 鸣人 19
文章来源:https://www.toymoban.com/news/detail-515808.html
到了这里,关于Iceberg从入门到精通系列之五:Zeppelin集成iceberg,创建iceberg普通表和分区表,并插入数据的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!