Skip to content

Using xarray with zarr.ABSStore objects #4680

Answered by nhsavage
nhsavage asked this question in Q&A
Discussion options

You must be logged in to vote

thanks to some help from my colleagues, the key mistake here is that I need to use:
open_zarr not open_data
Also I had not set the creditials correctly.

import zarr
import xarray
xarray.set_options(display_style='text') # Work around for AML bug that won't display HTML output. 
store = zarr.ABSStore(container='my_container_name', prefix='monthly/', account_name="my_account_name", blob_service_kwargs={"sas_token":SAS})
xr = xarray.open_zarr(store)
xr

(without the display_style option then if you just put xr in a jupyter notebook for example, then it doesn't show anything, although print does work)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nhsavage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant