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] Requesting schema and table without catalog #4870

Open
taylor12805 opened this issue Sep 6, 2024 · 0 comments
Open

[FEATURE] Requesting schema and table without catalog #4870

taylor12805 opened this issue Sep 6, 2024 · 0 comments
Labels
feature New feature or request

Comments

@taylor12805
Copy link

taylor12805 commented Sep 6, 2024

Describe the feature

Need APIs to return table detailed information including catalog info (might be multiple) when requesting schema and table without catalog
Below describe API request and response parameters:
request -> (metalake, schema, table)
response -> (catalog, schema, table info)

Motivation

We store tables with same table info in multiple catalogs so that we can 1) separate user access to multiple catalogs and 2) to recover from data center disaster.
To get available catalogs containing specified schema.table, we have to iterator through all the catalogs to retrieve the list of available catalogs, which is quite inefficient. So we need an API to efficiently retrieve available catalogs matching requested (metalake, schema, table) parameters.

Describe the solution

  • API
    use wildcard character to denote any matching identifier(catalog, schema, etc.) in path: /metalakes/:metalake/catalogs/:catalogs/schemas/:schema/tables/:table
    so the request might containing wildcard catalog
    and the response is list of table containing catalog info
Path:
/metalakes/:metalake/catalogs/:catalogs/schemas/:schema/tables/:table

Request parameter:
(String metalake, String catalog = "*", String schema, String table)

Response:
List<Table>
  • Backend
    add function getTablePOByName in class TableMetaService to query table table_meta with tableName parameter
TableMetaService.java
List<TablePO> getTablePOByName(String tableName)

TableMetaSQLProviderFactory.java
List<String> selectTableIdByName(String name)

Additional context

No response

@taylor12805 taylor12805 added the feature New feature or request label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant