Skip to content

Commit

Permalink
sqme: chunk_store fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill888 committed Jun 28, 2024
1 parent 192ff61 commit 3f49a0b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion odc/loader/_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,16 @@ def from_raster_source(
spec = extract_zarr_spec(driver_data)
assert spec is not None

# Chunk store resolution
# 1. Use supplied chunk_store
# 2. Use ctx.fs if available
# 3. Use fsspec.get_mapper(src.uri)

if chunk_store is None:
chunk_store = ctx.fs
if ctx.fs:
chunk_store = ctx.fs
else:
chunk_store = fsspec.get_mapper(src.uri)

if isinstance(chunk_store, fsspec.AbstractFileSystem):
chunk_store = chunk_store.get_mapper(src.uri)
Expand Down

0 comments on commit 3f49a0b

Please sign in to comment.