apache / apache/gravitino

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

Open
#9,208 2 comments 0 reactions 1 assignee Claimed by @sunxiaojian View on GitHub
help wanted improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 16h
Merged PRs (30d)
298

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.