Usage
Creating TileDB Arrays
The following example shows you how to create a 2D sparse TileDB array with a single attribute. See Configuration Parameters for details on the MyTile and core TileDB options you can set. Note that filters are optional for creating a table.
If you wish to create an array on S3, the command is similar. Only the array name needs to change to an S3 URI:
You can see the array schema as follows:
A TileDB array created through MariaDB is and behaves exactly like any other TileDB array. Therefore, it is accessible by all TileDB APIs (e.g., Python) and integrations (e.g., Spark).
Querying TileDB Arrays
MariaDB can dynamically discover existing TileDB arrays, i.e., even if they were created and populated externally from MariaDB. Therefore, you can just insert data into a TileDB array or query it as follows:
Note that, if your array URI is longer than 64 characters, you need to use MariaDB's assisted table discovery for long names by simply doing the following:
Encrypted TileDB Arrays
MyTile supports querying encrypted TileDB arrays by passing the encryption key as a parameter to the assisted table discovery. Note that due to a limitation of MariaDB, if you pass an encryption key it will be shown in the create table statement for any MariaDB user which has permissions to view the created table.
Querying Array Metadata
Array metadata can be queried using a special suffix for the array URI. Adding @metadata
to the URI will trigger MyTile to query the array metadata instead of the array data. The results are returned in two columns, key
and value
, both with string (TEXT
) datatype in MariaDB. If a metadata value contains more than one value then a comma delimited string is returned.
Time Traveling
Time traveling for TileDB arrays is supported in two methods.
Dynamic Discovery With @timestamp
You can use the @<timestamp>
keyword on the array URI to trigger MyTile to query the array at the given timestamp. This is equivalent to using open_at
in other APIs.
Create Table
You can also use time traveling with the open_at=<timestamp>
parameter with create table discovery.
Last updated