Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] [Sql Gateway][WIP] Implement flink catalog use mysql as metadata store backend #3504

Closed
wants to merge 1 commit into from

Conversation

zhengkezhou1
Copy link
Contributor

What changes were proposed in this pull request

Issue Number: close #2888

Implement flink catalog use mysql as metadata store backend

Brief change log

Add MySQL table schema

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

Does this pull request potentially affect one of the following parts

  • Dependencies (does it add or upgrade a dependency): (no)

@zhengkezhou1
Copy link
Contributor Author

This table is used to store all Catalogs

eg: MySQLCatalog, PGCatalog, HiveCatalog

CREATE TABLE t_catalog(
	`id` bigint auto_increment NOT NULL,
    `catalog_name` varchar(10) NOT NULL comment 'catalog name',
    `catalog_type` varchar(10) NOT NULL comment '1.jdbc 2.hive',
    `default_database` varchar(50) NOT NULL, 
    `username` varchar(50), 
    `password` varchar(50), 
    `base-url` varchar(100) comment 'jdbc connection',
    `hive-conf-dir` varchar(100) comment 'hive config path',
    `create_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    `update_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    primary key (`id`) using btree
)engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;

This table is used to store the database managed in Catalog

CREATE TABLE t_catalog_databases (
    `id` bigint auto_increment NOT NULL,
    `catalog_id` bigint NOT NULL,
    `database_name` varchar(100) NOT NULL comment 'databbase name in catalog', 
    `create_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    `update_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    primary key (`id`) using btree
)engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;

This table is used to store tables managed in Catalog

CREATE TABLE t_catalog_tables (
    `id` bigint auto_increment NOT NULL,
    `catalog_id` bigint NOT NULL,
    `catalog_database_id` bigint NOT NULL,
    `table_name` varchar(100) NOT NULL comment 'table name in database', 
    `create_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    `update_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    primary key (`id`) using btree
)engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;

@zhengkezhou1
Copy link
Contributor Author

@wolfboys pls take a look

@wolfboys
Copy link
Member

cc @GOODBOY008 Can you review this feature? BTW #2274 is also about the proposal for sqlgateway. It's time for us to move that proposal forward. 💪

@caicancai caicancai requested a review from GOODBOY008 January 22, 2024 01:48
@zhengkezhou1 zhengkezhou1 deleted the catalog-store branch June 18, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] [Sql Gateway] Implement flink catalog use mysql as metadata store backend
2 participants