apache/gravitino

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

Open

#9,208 opened on Nov 21, 2025

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Java (887 forks)auto 404
help wantedimprovement

Repository metrics

Stars
 (3,058 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide