You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "JanKaul (via GitHub)" <gi...@apache.org> on 2023/04/01 06:36:19 UTC

[GitHub] [iceberg] JanKaul opened a new issue, #7261: Rest-Catalog: Define Route to update MetadataLocation of a Table

JanKaul opened a new issue, #7261:
URL: https://github.com/apache/iceberg/issues/7261

   ### Feature Request / Improvement
   
   ## Background
   
   When using the REST catalog the metadata of an iceberg table is stored in the REST catalog as well as in the `metadata.json` file. If I understand correctly, the REST catalog is not responsible to update the `metadata.json` file according to changes that were applied to the catalog. It is the responsibility of the client to update the `metadata.json` file. When the client has updated the `metadata.json` file and created a new location for it, it has to update the `metadata-location` of the table in the REST catalog.
   
   ## Feature Request
   
   It would be helpful for clients to be able to update the `metadata-location` of a table by calling a REST catalog route.
   
   This could be achieved in two ways:
   
   1. Adopt `updateTable` operation to allow updates to the `metadata-location`
   2. Create a new route for a `updateTableMetadataLocation` operation
   
   The second approach could be achieved with:
   ```
     /v1/{prefix}/namespaces/{namespace}/tables/{table}/metadata-location:
       parameters:
         - $ref: '#/components/parameters/prefix'
         - $ref: '#/components/parameters/namespace'
         - $ref: '#/components/parameters/table'
   
       post:
         tags:
           - Catalog API
         summary: Update the metadata-location of a table
         operationId: updateTableMetadataLocation
         description:
           Update the metadata-location of a table
   
           Given the previous metadata-location and the new metadata-location the catalog verifies that the previous 
           metadata-location corresponds to the current value and performs the update if the verification succeeds.
         requestBody:
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/UpdateTableMetadataLocationRequest'
   
       UpdateTableMetadataLocationRequest:
         type: object
         required:
           - previous-metadata-location
           - metadata-location
         properties:
           previous-metadata-location:
             type: string
           metadata-location:
             type: string
   ```
   
   
   
   
   ### Query engine
   
   None


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JanKaul closed issue #7261: Rest-Catalog: Define Route to update MetadataLocation of a Table

Posted by "JanKaul (via GitHub)" <gi...@apache.org>.
JanKaul closed issue #7261: Rest-Catalog: Define Route to update MetadataLocation of a Table
URL: https://github.com/apache/iceberg/issues/7261


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org