# Complex data structures in meta

**URL:** <https://forum.tiledb.com/t/complex-data-structures-in-meta/490>\
**Category:** Uncategorized\
**Created:** [July 27, 2022, 12:11pm UTC](https://forum.tiledb.com/t/complex-data-structures-in-meta/490 "2022-07-27T12:11:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![royassis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/royassis/32/231_2.png) [@royassis](https://forum.tiledb.com/u/royassis)\
**Post date:** [July 27, 2022, 12:11pm UTC](https://forum.tiledb.com/t/complex-data-structures-in-meta/490/1 "2022-07-27T12:11:51Z")

</div>

Hello.  
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 ?

---

<div class="post-metadata">

**Author:** ![ihnorton](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ihnorton/32/23_2.png) [@ihnorton](https://forum.tiledb.com/u/ihnorton)\
**Post date:** [July 27, 2022, 2:09pm UTC](https://forum.tiledb.com/t/complex-data-structures-in-meta/490/2 "2022-07-27T14:09:21Z")

</div>

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.

Best,  
Isaiah

---

<div class="post-metadata">

**Author:** ![royassis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/royassis/32/231_2.png) [@royassis](https://forum.tiledb.com/u/royassis)\
**Post date:** [September 29, 2022, 11:34am UTC](https://forum.tiledb.com/t/complex-data-structures-in-meta/490/3 "2022-09-29T11:34:37Z")

</div>

Hey @ihnorton

What I want to do is:

```auto
import tiledb

with tiledb.open("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)” ?

---

<div class="post-metadata">

**Author:** ![ihnorton](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ihnorton/32/23_2.png) [@ihnorton](https://forum.tiledb.com/u/ihnorton)\
**Post date:** [September 29, 2022, 12:49pm UTC](https://forum.tiledb.com/t/complex-data-structures-in-meta/490/4 "2022-09-29T12:49:35Z")

</div>

Hi @royassis,

> [@royassis](#):
>
> So instead im converting the array to json.

Yes, that is the best approach currently 👍

> [@royassis](#):
>
> What do you mean by “TileDB types (including multi-val cells)” ?

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](https://docs.tiledb.com/main/how-to/arrays/writing-arrays/fixed-length-attributes) for some more details).

Best,  
Isaiah

---

<div class="post-metadata">

**Author:** ![royassis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/royassis/32/231_2.png) [@royassis](https://forum.tiledb.com/u/royassis)\
**Post date:** [September 29, 2022, 1:28pm UTC](https://forum.tiledb.com/t/complex-data-structures-in-meta/490/5 "2022-09-29T13:28:02Z")

</div>

Thanks @ihnorton, much appreciated
