Mismatching Cell Num for Subarray

Hey all,

I am running into an issue where if I’m trying to write a subarray using the C++ API, it’s telling me that the number of expected cells is not equal to the actual number of cells. The trick is that I’m only trying to read the first 5 values in the array, so my subarray looks like this:

  std::vector<uint64_t> subarray = {0, 0, 0, 4};

Am I running into issues because I’m only accessing the 0th row? The rest of my query looks like this:

tiledb::Query md_write(_ctx, array, TILEDB_WRITE);
md_write.set_buffer("data", img_values);

where img_values is a vector of 5 values.


Hi Christina,

Is data the only attribute in your array? When writing in TileDB, you must provide values for all attributes.


Yes, I only have one attribute.

I should probably also mention I’m on v1.3.1 right now

Ah, I found my issue. I had the number of values per cell reversed (not entirely sure how I managed that, but at least I found it!)

Thank you!

Great, glad you found it!