NihalJain opened a new issue, #15918:
URL: https://github.com/apache/pinot/issues/15918

    Currently pinot allows us to fetch tables specific to a DB only, but there 
can be use case where users/admins may want to see all list of DBs across the 
cluster. For example we want to view all tables in the cluster in UI.
   
   This issue is to add a feature to do that. But we could do this in one of 
the following ways, need to discuss best approach:
   
   - **Option 1: Use asterisk (*) as db name**
     - Modify the REST API to support fetching all tables/schemas/etc. 
irrespective of the database name.
     - To achieve this we modify the existing endpoint to accept a asterisk 
(`*`) for the database header to return resources from all databases.
     - Only concern is currently Pinot allows even asterisk to be a DB Name, we 
may have to reserve this character, or not let users create a db with anme just 
'*'!
             ```sh
             curl -X GET \
               http://localhost:9000/tables \
               -H 'Accept: application/json' \
               -H 'database: *'
             ```
   - **Option 2: Introduce a new header, say 'fetch_all_db'**
     -  Introduce a new boolean header to support fetching all 
tables/schemas/etc
     - We should not pass database name to this one, it will be ignored anyways
               ```sh
               curl -X GET \
                 http://localhost:9000/tables \
                 -H 'Accept: application/json' \
                 -H 'fetch_all_db: true'
               ```
   - **Option 3: Add support for regex in filtering resources**
     -  Introduce new query parameters or headers, e.g. db_regex=<pattern>, to 
indicate that resources from all databases should be returned and filtered 
using the provided regex pattern.
     - We should not pass database name to this one, it will be ignored anyways.
     - This might be an overkill but maybe useful in other use cases
               ```sh
                 curl -X GET \
                   http://localhost:9000/tables \
                   -H 'Accept: application/json' \
                   -H 'db_regex: .*'
               ```
   
   Ref https://github.com/apache/pinot/issues/14068


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to