JuliaDataCubes / JuliaDataCubes/YAXArrays.jl
overwrite in savedataset fails for S3
Open
Nobody has claimed this yet.
bug
- Dominant language
- Julia
- Stars
- 132
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
When I try to overwrite an old dataset on S3 in savedataset this doesn't remove the already laying data and fails with the following error:
julia> dsout = savedataset(outds_skeleton,path=outpath*".zarr",skeleton=true,overwrite=true)
ERROR: Store is not empty
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:44
[2] zgroup(s::S3Store, path::String; attrs::Dict{String, Any}, indent_json::Bool)
@ Zarr ~/Documents/baresoilfraction_opengeohub/dev/Zarr/src/ZGroup.jl:133
[3] zgroup(s::String; kwargs::@Kwargs{attrs::Dict{String, Any}})
@ Zarr ~/Documents/baresoilfraction_opengeohub/dev/Zarr/src/ZGroup.jl:147
[4] zgroup
@ ~/Documents/baresoilfraction_opengeohub/dev/Zarr/src/ZGroup.jl:147 [inlined]
[5] create_empty
@ ~/.julia/packages/YAXArrayBase/lAdRh/ext/ZarrExt.jl:55 [inlined]
[6] create_dataset(T::Type, path::String, gatts::Dict{…}, dimnames::Vector{…}, dimvals::Vector{…}, dimattrs::Vector{…}, vartypes::Vector{…}, varnames::Vector{…}, vardims::Vector{…}, varattrs::Vector{…}, varchunks::Vector{…}; kwargs::@Kwargs{})
@ YAXArrayBase ~/.julia/packages/YAXArrayBase/lAdRh/src/datasets/datasetinterface.jl:59
[7] create_dataset(T::Type, path::String, gatts::Dict{…}, dimnames::Vector{…}, dimvals::Vector{…}, dimattrs::Vector{…}, vartypes::Vector{…}, varnames::Vector{…}, vardims::Vector{…}, varattrs::Vector{…}, varchunks::Vector{…})
@ YAXArrayBase ~/.julia/packages/YAXArrayBase/lAdRh/src/datasets/datasetinterface.jl:58
[8] savedataset(ds::Dataset; path::String, persist::Nothing, overwrite::Bool, append::Bool, skeleton::Bool, backend::Symbol, driver::Symbol, max_cache::Float64, writefac::Float64, kwargs::@Kwargs{})
@ YAXArrays.Datasets ~/.julia/packages/YAXArrays/x5iTf/src/DatasetAPI/Datasets.jl:714
[9] top-level scope
@ REPL[145]:1
Some type information was truncated. Use `show(err)` to see complete types.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the savedataset call in YAXArrays.Datasets and follow create_empty in YAXArrayBase's ZarrExt.jl to the zgroup implementation in Zarr/src/ZGroup.jl. Reproduce the S3 overwrite case, then verify that an existing dataset can be overwritten without the "Store is not empty" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, julia
- Domain
- cloud, data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100