zcollection.create_view#
- zcollection.create_view(path, view_ref, *, filesystem=None, filters=None, synchronizer=None)[source]#
Create a new view.
- Parameters:
path (str) – View storage directory.
view_ref (ViewReference) – Access properties for the reference view.
filesystem (AbstractFileSystem | str | None) – The file system used to access the view.
filters (str | Callable[[Dict[str, int]], bool] | None) – The filters used to select the partitions of the reference view. If not provided, all partitions are selected.
synchronizer (Sync | None) – The synchronizer used to synchronize the view.
- Return type:
Example
>>> view_ref = ViewReference( ... partition_base_dir="/data/mycollection") >>> view = create_view("/home/user/myview", view_ref)