-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to_icechunk
for xarray
#357
base: main
Are you sure you want to change the base?
Conversation
e2cc4d3
to
ea401fe
Compare
This adds two APIs. One is "easy" and does everything in one step, the other allows extra control over initializing the store, and subsequent writes.
from icechunk.xarray import XarrayDatasetWriter
writer = XarrayDatasetWriter(ds, store=store)
writer.write_metadata(group="new2", mode="w") # write metadata
writer.write_eager() # write in-memory arrays
writer.write_lazy() # eagerly write dask arrays The |
bbed44f
to
42c963a
Compare
|
||
Write metadata for arrays in one step. This "initializes" the store but has not written an real values yet. | ||
```python | ||
writer.write_metadata(group="new2", mode="w") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about appends & region writes here.
Naive question: if Also should we call cc @mpiannucci |
It is not. |
Can you expand on what this means in practice? If I have a big distributed dask array, I call to |
Adds
icechunk.xarray.to_icechunk
.TODO:
load_stored
kwarg todask.array.store
. dask/dask#11465examples/dask_write.py
examples/xarray_write.py
?