xarray_beam.validate_zarr_chunk¶
- xarray_beam.validate_zarr_chunk(key, chunk, template, zarr_chunks=None, zarr_shards=None)[source]¶
Check a chunk for consistency against the given template.
- Parameters:
key (Key) – the Key corresponding to the position of the chunk to write in the template.
chunk (Dataset) – the chunk to write.
template (Dataset) – a lazy xarray.Dataset already chunked using Dask (e.g., as created by xarray_beam.make_template). One or more variables are expected to be “chunked” with Dask, and will only have their metadata written to Zarr without array values.
zarr_chunks (Mapping[str, int] | None) – chunking scheme to use for Zarr. If set, overrides the chunking scheme on already chunked arrays in template.
zarr_shards (Mapping[str, int] | None) – optional sharding scheme to use for Zarr. If set, checked instead of zarr_chunks to verify that a full write is being done.
- Return type:
None