H5Ocopy to copy into existing group?

Hello!

The documentation for
https://support.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-Copy
says:

If dst_name already exists at the location dst_loc_id, H5Ocopy will fail.

I find it limiting. In particular, I’d like to export a subset of HDF5
dataset into a separate file, efficiently copying the group subitems and
attributes info another HDF5 file’s root. Although it’s in theory
possible to implement on my side, wouldn’t it be great if that was
handled at HDF5 library level?

Any chance this limitation is someday relieved?

Best wishes,
Andrey Paramonov

Andrey,

Thank you for your suggestion. I created an issue report HDFFV-10417 for your reference.

Elena

Hello Elena!

05.03.2018 7:29, epourmal пишет:

Thank you for your suggestion. I created an issue report HDFFV-10417 for
your reference.

Great, thank you!

To clarify: I’m thinking of something along the lines of (h5py code)

for link in src:
dst.copy(src[link], dst, link)
dst.attrs.update(src.attrs)

that works even if dst is file root or existing (empty) group.

Best wishes,
Andrey Paramonov