Conversation
| You can also use this method to check for view existence using 'try catalog.load_view() except NoSuchViewError'. | ||
| Note: This method doesn't scan data stored in the view. |
There was a problem hiding this comment.
Nit: I would say we remove these.
There was a problem hiding this comment.
+1 this is simply just load a view it doesn't have to follow the convention of load_table.
| assert actual == expected | ||
|
|
||
|
|
||
| def test_load_view_404(rest_mock: Mocker) -> None: |
There was a problem hiding this comment.
Would also add a test that should return a view does not exists when trying to load a table with loadView
There was a problem hiding this comment.
Correct me if I'm wrong, but isn't this case already covered with the test_load_view_404 test?
If no view with the same identifier as the table identifier is found in the warehouse, this would be the same case as loading a non existent view.
| You can also use this method to check for view existence using 'try catalog.load_view() except NoSuchViewError'. | ||
| Note: This method doesn't scan data stored in the view. |
There was a problem hiding this comment.
+1 this is simply just load a view it doesn't have to follow the convention of load_table.
| self._check_endpoint(Capability.V1_LOAD_VIEW) | ||
| response = self._session.get( | ||
| self.url(Endpoints.load_view, prefixed=True, **self._split_identifier_for_path(identifier, IdentifierKind.VIEW)), | ||
| params={}, |
There was a problem hiding this comment.
nitty: we don't need to pass in the empty params
Rationale for this change
This is part of #818 and implements the
load_viewmethod for REST catalogs.Are these changes tested?
Unit tests are added for:
Are there any user-facing changes?
This adds the
load_viewmethod for REST catalogs