-
Notifications
You must be signed in to change notification settings - Fork 3.2k
REST Spec: Add unregister table endpoint #16400
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1217,6 +1217,56 @@ paths: | |
| 5XX: | ||
| $ref: '#/components/responses/ServerErrorResponse' | ||
|
|
||
| /v1/{prefix}/namespaces/{namespace}/tables/{table}/unregister: | ||
| parameters: | ||
| - $ref: '#/components/parameters/prefix' | ||
| - $ref: '#/components/parameters/namespace' | ||
| - $ref: '#/components/parameters/table' | ||
|
|
||
| post: | ||
| tags: | ||
| - Catalog API | ||
| summary: Unregister a table without removing its data or metadata files | ||
| operationId: unregisterTable | ||
| parameters: | ||
| - $ref: '#/components/parameters/idempotency-key' | ||
| description: | ||
| Unregister a table from the catalog. This is the opposite of | ||
| `registerTable`. The table no longer exists in the catalog, but the | ||
| underlying data and metadata files are left in place so that the table | ||
| can be registered in another catalog. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you also add comment to explain the difference between this and the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems unnecessary to me. The In addition, this description already calls out the relevant parts: that data and metadata are left in place so they can be registered in another catalog. I think this is another example of "less is more" in our specs. If we were to call out that "unlike drop" this doesn't delete data and metadata, we're making the requirements more confusing because we don't specify when data should be deleted (if at all) for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
True for the traditional DBs, but not so for the data lake engines. Both AWS Redshift and AWS Athena do not purge table data when running I am afraid that if we don't call out the semantics of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An interesting experiment using Claude and the latest mainline. If LLM is confused, I bet many human, and human who use LLMs, would be confused too. |
||
|
|
||
|
|
||
| On success, this returns the table's last metadata location and the | ||
| corresponding table metadata. This table metadata must include all | ||
| commits that happened before the unregister operation. All attempted | ||
| commits after the unregister operation in this catalog must fail. | ||
| responses: | ||
| 200: | ||
| $ref: '#/components/responses/UnregisterTableResponse' | ||
| 400: | ||
| $ref: '#/components/responses/BadRequestErrorResponse' | ||
| 401: | ||
| $ref: '#/components/responses/UnauthorizedResponse' | ||
| 403: | ||
| $ref: '#/components/responses/ForbiddenResponse' | ||
| 404: | ||
| description: | ||
| Not Found - NoSuchTableException, table to unregister does not exist | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/IcebergErrorResponse' | ||
| examples: | ||
| TableToUnregisterDoesNotExist: | ||
| $ref: '#/components/examples/NoSuchTableError' | ||
| 419: | ||
| $ref: '#/components/responses/AuthenticationTimeoutResponse' | ||
| 503: | ||
| $ref: '#/components/responses/ServiceUnavailableResponse' | ||
| 5XX: | ||
| $ref: '#/components/responses/ServerErrorResponse' | ||
|
|
||
| /v1/{prefix}/namespaces/{namespace}/tables/{table}/credentials: | ||
| parameters: | ||
| - $ref: '#/components/parameters/prefix' | ||
|
|
@@ -3792,6 +3842,23 @@ components: | |
| type: boolean | ||
| default: false | ||
|
|
||
| UnregisterTableResult: | ||
| description: | ||
| Last metadata location and the corresponding table metadata for the | ||
| table that was successfully unregistered and is no longer tracked by | ||
| the catalog. | ||
| type: object | ||
| required: | ||
| - metadata-location | ||
| - metadata | ||
| properties: | ||
| metadata-location: | ||
| type: string | ||
| description: | ||
| The last metadata location for the table at the time it was unregistered. | ||
| metadata: | ||
| $ref: '#/components/schemas/TableMetadata' | ||
|
|
||
| CreateViewRequest: | ||
| type: object | ||
| required: | ||
|
|
@@ -5059,6 +5126,13 @@ components: | |
| etag: | ||
| $ref: '#/components/parameters/etag' | ||
|
|
||
| UnregisterTableResponse: | ||
| description: Response when a table is successfully unregistered. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/UnregisterTableResult' | ||
|
|
||
| LoadViewResponse: | ||
| description: View metadata result when loading a view | ||
| content: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.