Writing Sparse Cells
This is applicable to sparse arrays (see Sparse Writes for more details). You can write sparse cells in an array as follows:
The code snippets above write the sparse cells shown in the figure below, assuming a 2D array with a int64
domain [1, 4] x [1, 4]
, 2x2
space tiling, row-major tile and cell order, and a single int32
attribute called a
. The unordered layout means that you do no have to worry about the order of the values when writing them. Since you must explicitly set the coordinates, TileDB knows how to properly sort on the global order before writing them cells to persistent storage. If you switch to global order, make sure to organize your cells properly before writing (see figure below).
Currently, if your array consists of more than one attributes, TileDB requires you to provide values for all the attributes in each write operation.
Last updated