Time Traveling

You can open or reopen an array at a particular timestamp, if for example you'd like to see a view of the array in the past. See Time Traveling for more details. You can do so as follows:

C
C++
Python
R
Java
Go
C
// ... create context ctx
// Open at a timestamp
uint64_t timestamp = 1561492235844; // In ms
tiledb_array_alloc(ctx, "<array-uri>", &array);
tiledb_array_open_at(ctx, array, TILEDB_WRITE, timestamp);
// Or, ppen encrypted array with key at timestamp
const char key[] = "0123456789abcdeF0123456789abcdeF";
tiledb_array_t* array;
tiledb_array_alloc(ctx, "<array-uri>", &array);
tiledb_array_open_at_with_key(
ctx, array, TILEDB_WRITE, TILEDB_AES_256_GCM, key, sizeof(key), timestamp);
C++
// ... create context ctx
// Open at a timestamp
uint64_t timestamp = 1561492235844; // In ms
Array array(ctx, "<array-uri>", TILEDB_WRITE, timestamp);
// Or, open encrypted array with key at timestamp
const char key[] = "0123456789abcdeF0123456789abcdeF";
Array array(ctx, "<array-uri>", TILEDB_WRITE, TILEDB_AES_256_GCM, key, sizeof(key), timestamp);
Python
timestamp = 1561492235844 # time in ms
# Array constructors support a `timestamp` keyword argument
A = tiledb.DenseArray(uri, timestamp=timestamp)
A = tiledb.SparseArray(uri, timestamp=timestamp)
# Or, open encrypted array with key at timestamp
key = "0123456789abcdeF0123456789abcdeF"
A = tiledb.DenseArray(uri, key=key, timestamp=timestamp)
A = tiledb.SparseArray(uri, key=key, timestamp=timestamp)
R
# TODO: Time travelling is not currently supported in the R api
Java
// TODO: Time traveling is not currently supported in the Java API
Go
// ... create context ctx
// Open at a timestamp
var timestamp uint64 = 1561492235844; // In ms
array.OpenAt(TILEDB_ERITE, timestamp)
// Or, open encrypted array with key at timestamp
var key := "0123456789abcdeF0123456789abcdeF"
array.OpenWithKey(TILEDB_READ, TILEDB_AES_256_GCM, key)