-
Notifications
You must be signed in to change notification settings - Fork 2.9k
SPEC: Add REST endpoint for registering views #14869
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 |
|---|---|---|
|
|
@@ -1832,6 +1832,60 @@ paths: | |
| 5XX: | ||
| $ref: '#/components/responses/ServerErrorResponse' | ||
|
|
||
| /v1/{prefix}/namespaces/{namespace}/register-view: | ||
| parameters: | ||
| - $ref: '#/components/parameters/prefix' | ||
| - $ref: '#/components/parameters/namespace' | ||
|
|
||
| post: | ||
| tags: | ||
| - Catalog API | ||
| summary: Register a view in the catalog | ||
| parameters: | ||
| - $ref: '#/components/parameters/idempotency-key' | ||
| description: | ||
| Register a view in the given namespace using given metadata file location. | ||
|
Collaborator
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. "Register a view using given metadata file location." to be in line with registerTable?
Member
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. same as above |
||
|
|
||
| operationId: registerView | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/RegisterViewRequest' | ||
| responses: | ||
| 200: | ||
| $ref: '#/components/responses/LoadViewResponse' | ||
| 400: | ||
| $ref: '#/components/responses/BadRequestErrorResponse' | ||
| 401: | ||
| $ref: '#/components/responses/UnauthorizedResponse' | ||
| 403: | ||
| $ref: '#/components/responses/ForbiddenResponse' | ||
| 404: | ||
| description: Not Found - The namespace specified does not exist | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/IcebergErrorResponse' | ||
| examples: | ||
| NamespaceNotFound: | ||
| $ref: '#/components/examples/NoSuchNamespaceError' | ||
| 409: | ||
| description: Conflict - The view already exists | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/IcebergErrorResponse' | ||
| examples: | ||
| ViewAlreadyExists: | ||
| $ref: '#/components/examples/ViewAlreadyExistsError' | ||
| 419: | ||
| $ref: '#/components/responses/AuthenticationTimeoutResponse' | ||
| 503: | ||
| $ref: '#/components/responses/ServiceUnavailableResponse' | ||
| 5XX: | ||
| $ref: '#/components/responses/ServerErrorResponse' | ||
|
|
||
| components: | ||
| ####################################################### | ||
|
|
@@ -3687,6 +3741,17 @@ components: | |
| additionalProperties: | ||
| type: string | ||
|
|
||
| RegisterViewRequest: | ||
| type: object | ||
| required: | ||
| - name | ||
| - metadata-location | ||
| properties: | ||
| name: | ||
| type: string | ||
| metadata-location: | ||
| type: string | ||
|
|
||
|
Collaborator
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.
Member
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. I did see this. But the java functionality in |
||
| TokenType: | ||
| type: string | ||
| enum: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the summary of registerTable
Register a table in the given namespace using given metadata file locationI think we should be in line with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally changed it as summary should be shorter than description. I don't think we should follow everything. We should do what is right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of them are pretty short, so I don't think it matters which one is somewhat longer. I'd value consistency across the table and view functionality but that might be just my personal preference.