dremio CTAS 与数据DML 操作

dremio对于文件系统支持CTAS (s3,nas,hdfs。。。),以前版本默认创建是是parquet 格式的文件,新版本默认使用iceberg 格式
基于iceberg 的格式很有意思,我们不只可以进行数据的显式物化,同时还可以进行数据的多DML,同时还能复用iceberg 强大的数据管理
能力

参考使用

主要演示下使用命令

  • 参考命令
create table s3.demoapp.demotable as select * from pg.demoapp 
  • dml 操作
// insert 
insert into s3.demoapp.demotable(name,age) values('demo',11);
// delete 
delete from s3v2.dbt.dalongdemov2 where name='dalongv1'

问题

  • is not configured to support DML operations

CTAS 创建的表不是iceberg 格式的,应该是早期的parquet 的,可以通过执行CTAS 重新转换,同时注意配置文件存储CTAS 的格式为iceberg

说明

以上支持说了对于DML的操作,实际上也是支持DDL 操作的,比如添加以及修改列,当然还有其他关于iceberg 的一些操作(历史快照,属性信息。。),基于iceberg 的CTAS 操作一种比较有用的事情就是进行快照物化,然后基于原始数据的变动进行增量的更新处理,同时结合iceberg
强大的多数据管理能力解决历史数据查询问题

参考资料

sabot/kernel/src/main/java/com/dremio/exec/store/iceberg/IcebergUtils.java
sabot/kernel/src/main/java/com/dremio/exec/planner/sql/handlers/commands/CommandCreator.java
https://docs.dremio.com/current/sonar/data-sources/object/s3/#advanced-options
https://docs.dremio.com/current/reference/sql/commands/tables
https://docs.dremio.com/current/reference/sql/commands/apache-iceberg-tables/apache-iceberg-create
https://docs.dremio.com/current/reference/sql/commands/apache-iceberg-tables/apache-iceberg-insert

posted on   荣锋亮  阅读(23)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2023-03-01 haproxy 2.x 请求头安全问题
2023-03-01 cube.js 自定义驱动 static dialectClass 方法说明
2022-03-01 minio 支持移除server pool
2022-03-01 Metriql 无头bi 工具
2022-03-01 dremio arrow flight 协议server实现——DremioFlightProducer代码简单介绍
2022-03-01 dremio arrow flight 协议实现——简单说明
2022-03-01 haproxy dataplaneapi 2.5 发布

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示