Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyiceberg/catalog/rest/__init__.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -185,6 +185,7 @@ class Capability:
V1_LIST_VIEWS = Endpoint(http_method=HttpMethod.GET, path=f"{API_PREFIX}/{Endpoints.list_views}")
V1_LOAD_VIEW = Endpoint(http_method=HttpMethod.GET, path=f"{API_PREFIX}/{Endpoints.load_view}")
V1_VIEW_EXISTS = Endpoint(http_method=HttpMethod.HEAD, path=f"{API_PREFIX}/{Endpoints.view_exists}")
V1_CREATE_VIEW = Endpoint(http_method=HttpMethod.POST, path=f"{API_PREFIX}/{Endpoints.create_view}")
V1_REGISTER_VIEW = Endpoint(http_method=HttpMethod.POST, path=f"{API_PREFIX}/{Endpoints.register_view}")
V1_DELETE_VIEW = Endpoint(http_method=HttpMethod.DELETE, path=f"{API_PREFIX}/{Endpoints.drop_view}")
V1_SUBMIT_TABLE_SCAN_PLAN = Endpoint(http_method=HttpMethod.POST, path=f"{API_PREFIX}/{Endpoints.plan_table_scan}")
Expand DownExpand Up@@ -215,6 +216,7 @@ class Capability:
(
Capability.V1_LIST_VIEWS,
Capability.V1_LOAD_VIEW,
Capability.V1_CREATE_VIEW,
Capability.V1_DELETE_VIEW,
)
)
Expand DownExpand Up@@ -971,6 +973,7 @@ def create_view(
location: str | None = None,
properties: Properties = EMPTY_DICT,
) -> View:
self._check_endpoint(Capability.V1_CREATE_VIEW)
iceberg_schema = self._convert_schema_if_needed(schema)
fresh_schema = assign_fresh_schema_ids(iceberg_schema)

Expand Down
1 change: 1 addition & 0 deletions tests/catalog/test_rest.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -107,6 +107,7 @@
Capability.V1_LIST_VIEWS,
Capability.V1_LOAD_VIEW,
Capability.V1_VIEW_EXISTS,
Capability.V1_CREATE_VIEW,
Capability.V1_REGISTER_VIEW,
Capability.V1_DELETE_VIEW,
Capability.V1_SUBMIT_TABLE_SCAN_PLAN,
Expand Down