apache/gravitino

[Improvement] Supply init script to create metadata tables for iceberg-rest-service JDBC catalog backend

Open

#9,208 创建于 2025年11月21日

在 GitHub 查看
 (2 评论) (0 反应) (1 负责人)Java (887 fork)auto 404
help wantedimprovement

仓库指标

Star
 (3,058 star)
PR 合并指标
 (PR 指标待抓取)

描述

What would you like to be improved?

The docs for iceberg-rest-service have this ( https://github.com/apache/gravitino/blob/main/docs/iceberg-rest-service.md?plain=1#L123 ):

If you are using multiple JDBC catalog backends, setting jdbc-initialize to true may not take effect for RDBMS like Mysql, you should create Iceberg meta tables explicitly.

However, there are no instructions for creating the tables. It would be great to supply a similar DDL script as what is supplied in https://github.com/apache/gravitino/tree/main/scripts for the entity database.

My use case is slightly different than the context in that note. Our security requirements are for all DDL to run as a privileged user, and the application user only has DML permissions. We have processes in place to run required migrations out of band of the running service (i.e., I would set jdbc-initialize=false). However, I need the correct DDL to do this. As a workaround, I can lift the security restriction locally and allow the tables to be created, then dump their schema. This has the drawback of no method of tracking upstream changes though.

How should we improve?

It would be ideal to provide the same set of DDL (so full DDL for the current version and any required migrations between versions) for the table(s) needed for the Iceberg REST service. Alternatively, have them be rolled into the entity files.

贡献者指南