Complex data structures in meta

I’m using tiledb-py. I’m trying to store a dict + a numpy array of strings (“|S15”). Seems this option is not available, will it be in the future ?

Hi @royassis,

Metadata is limited to TileDB types (including multi-val cells), so more complicated nested structures do not have direct translation. We do use JSON serialization to strings internally for a few purposes. If you can share a toy example we can provide code to round-trip.


Hey @ihnorton

What I want to do is:

import tiledb

with"somepath","w") as A:
    A.meta["somemeta"] = ["some","array"]

So instead im converting the array to json.

What do you mean by “TileDB types (including multi-val cells)” ?

Hi @royassis,

Yes, that is the best approach currently :+1:

If you write a.meta["foo"] = (1,2,3) then it will be stored as a “cell” with a fixed number of scalar values ((three, in this case – all must be of the same type). See here for some more details).


Thanks @ihnorton, much appreciated