xarray_beam.make_template

xarray_beam.make_template(dataset, lazy_vars=None)

Make a lazy Dask xarray.Dataset for use only as a template.

Lazy variables in an xarray.Dataset can be manipulated with xarray operations, but cannot be computed.

Parameters:
  • dataset (Dataset) – dataset to convert into a template.

  • lazy_vars (Optional[AbstractSet[str]]) – optional explicit set of variables to make lazy. By default, all data variables and coordinates that are not used as an index are made lazy, matching xarray.Dataset.chunk.

Returns:

Dataset with lazy variables. Lazy variable each use a single Dask chunk. Non-lazy variables are loaded in memory as NumPy arrays.

Return type:

Dataset