一、Zeppelin集成iceberg

  • Zeppelin支持Flink SQL
  • Flink SQL支持iceberg
  • Zeppelin集成Flink SQL后,就可以在Zeppelin上创建iceberg表了

下面演示下Zeppelin集成iceberg后,创建表,插入数据的方便性。

二、查看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
Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐