The docs here:
shows that groups have a different structure then what is shows here:
The latter only creates one file: __tiledb_group.tdb
Can I create groups as in the first examples? With pointers to other locations ?
The docs here:
shows that groups have a different structure then what is shows here:
The latter only creates one file: __tiledb_group.tdb
Can I create groups as in the first examples? With pointers to other locations ?
Hi @royassis,
Thanks for pointing this out - I’ve updated the second with further information and a reference to the first.
Best,
Isaiah
Hey @ihnorton
Can supply a python example for a group that references array in another location ?
Hi @royassis, sure, here’s an example which (1) creates an array in a temp directory, and (2) references that array from a group created in the current directory:
import tiledb, numpy as np
import tempfile, os
g_uri = "group1"
a_uri = os.path.join(tempfile.mkdtemp(), "array1")
print("creating array at URI: ", a_uri)
tiledb.from_numpy(a_uri, np.random.rand(4,2))
tiledb.Group.create(g_uri)
with tiledb.Group(g_uri, "w") as g:
g.add(a_uri)
with tiledb.Group(g_uri) as g:
print(g)
for a in g:
print("group member uri is: ", a.uri)
Hope that helps,
Isaiah
We are working on refactoring our docs so that all snippets can be tested in order to ensure they match available functionality in the current release.