更新时间:2025-07-08 GMT+08:00
Iceberg表服务
DataArtsFabric SQL提供一系列表服务,用户可以根据需要使用,例如清理旧快照,整理元数据、数据文件等,以提高存储、查询的效率。具体语法可参考ICEBERG表服务函数。
示例:
- 清理旧快照
select * from iceberg_expire_snapshots('iceberg_test','2025-05-15 14:12:00+08'); deleted_data_files_count | deleted_position_delete_files_count | deleted_equality_delete_files_count | deleted_manifest_files_count | deleted_manifest_lists_count | deleted_statistics_files_count ----------------------------+---------------------------------------+----------------------------------------+--------------------------------+--------------------------------+-------------------------------- 0 | 0 | 0 | 0 | 3 | 0 (1 row)
- 重写元数据文件
SELECT * from iceberg_rewrite_manifests('test1'); rewritten_manifests_count | added_manifests_count ---------------------------+----------------------- 2 | 1 (1 row)
- 清除孤立文件
SELECT * from iceberg_remove_orphanfiles('iceberg_test'); orphan_file_location ------------------------------------------------------------- obs://xxxx/test.txt obs://xxxx/test2.txt (2 rows)
父主题: SQL on Iceberg