一、Zeppelin集成iceberg
- Zeppelin支持Flink SQL
- Flink SQL支持iceberg
- Zeppelin集成Flink SQL后,就可以在Zeppelin上創(chuàng)建iceberg表了
下面演示下Zeppelin集成iceberg后,創(chuàng)建表,插入數(shù)據(jù)的方便性。文章來源地址http://www.zghlxwxcb.cn/news/detail-515808.html
二、查看catalog
show catalogs;
default_catalog
hive
iceberg
三、使用數(shù)據(jù)庫
use debeziumtest;
四、查看表
show tables;
productinfo
五、創(chuàng)建表
CREATE TABLE `productInfo` (
`id` int,
`productId` string,
`name` string,
`description` string,
`weight` float
)
六、插入數(shù)據(jù)
insert into iceberg.ods_stg.productInfo values(2,'1206827245738502144','scooter','Small 2-wheel scooter',3.14);
七、查詢數(shù)據(jù)
select * from productInfo
2 1206827245738502144 scooter Small 2-wheel scooter 3.140000104904175
八、創(chuàng)建分區(qū)表
CREATE TABLE `stu` (id int,name string, age int)
PARTITIONED BY (age)
九、分區(qū)表插入數(shù)據(jù)
insert into stu values(3,'殺sheng',16),(4,'鳴人',19)
十、查詢分區(qū)表數(shù)據(jù)
select * from stu
4 鳴人 19
文章來源:http://www.zghlxwxcb.cn/news/detail-515808.html
到了這里,關(guān)于Iceberg從入門到精通系列之五:Zeppelin集成iceberg,創(chuàng)建iceberg普通表和分區(qū)表,并插入數(shù)據(jù)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!