# Writing to virtual datasets

**URL:** <https://forum.hdfgroup.org/t/writing-to-virtual-datasets/8188>\
**Category:** HDF5 Library\
**Created:** [February 22, 2021, 3:01pm UTC](https://forum.hdfgroup.org/t/writing-to-virtual-datasets/8188 "2021-02-22T15:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas1](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/thomas1/32/1733_2.png) [@thomas1](https://forum.hdfgroup.org/u/thomas1)\
**Post date:** [February 22, 2021, 3:01pm UTC](https://forum.hdfgroup.org/t/writing-to-virtual-datasets/8188/1 "2021-02-22T15:01:21Z")

</div>

Is writing to a virtual dataset meant to work? The only document I can find that says anything about this is the [outdated RFC document](https://portal.hdfgroup.org/display/HDF5/RFC+HDF5+Virtual+Dataset), which mentions using H5Dwrite on a virtual dataset.

We were [asked about this in h5py](https://github.com/h5py/h5py/issues/1798). I found it partly works in practice, but there seems to be a problem with data conversion - when I wrote int64 data to an int32 virtual dataset, it appeared to skip conversion, so every second value was 0 (details [on the h5py issue](https://github.com/h5py/h5py/issues/1798)).

---

<div class="post-metadata">

**Author:** ![gheber](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/gheber/32/1919_2.png) [@gheber](https://forum.hdfgroup.org/u/gheber)\
**Post date:** [March 3, 2021, 12:59pm UTC](https://forum.hdfgroup.org/t/writing-to-virtual-datasets/8188/2 "2021-03-03T12:59:15Z")

</div>

Thomas, I believe you are right, but more competent people will have to chime in. On paper and in “straightforward” (TBD) cases, write operations are supported. The write w/ datatype conversion and size change might be one of those undocumented restrictions of the current VDS implementation.

Congratulations on the [h5py 3.2 release](https://forum.hdfgroup.org/t/ann-h5py-3-2-released/8232)!

G.
