TileDB-Inc / TileDB-MariaDB

MyTile is a MariaDB storage engine for accessing TileDB arrays
MIT License
29 stars 6 forks source link

MyTile

Build Status tiledb-mariadb tiledb-mariadb-server

MariaDB storage engine based on TileDB.

Quickstart Usage

Docker

Docker images are available on Docker Hub for quick testing of the mytile storage engine.

Variants

Supported tags

Examples

The tiledb-mariadb image starts a mariadb server and connects to it from the shell for you.

docker run --rm -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -it tiledb/tiledb-mariadb

If you want to access arrays on s3, you will need to add your AWS keys as env variables

docker run --rm -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e AWS_ACCESS_KEY_ID="<key>" -e AWS_SECRET_ACCESS_KEY="<secret>" -it tiledb/tiledb-mariadb

or mount a local array into the Docker container with the -v option:

docker run -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -it --rm -v /local/array/path:/data/local_array tiledb/tiledb-mariadb

Example SQL Usage

TileDB Arrays can be access directly via their URI.

Show create table:

show create table `s3://my/array`\G

Basic select:

select * from `s3://my/array`;

Use assisted table discovery for long uris:

create table my_array ENGINE=mytile uri='s3://my_bucket/arrays/sub_prefix/path_is_longer_than_64_chars/my_array_1';
select * from my_array;

Create table:

CREATE TABLE `s3://bucket/regions`(
  regionkey bigint WITH (dimension=true),
  name varchar,
  comment varchar
  ) uri = 's3://bucket/region' array_type='SPARSE';

Installation

Docker

To build either docker image locally simply use the following:

git clone https://github.com/TileDB-Inc/TileDB-MariaDB.git
cd TileDB-MariaDB

# tiledb-mariadb
docker build -t mytile -f docker/Dockerfile .

# tiledb-mariadb-server
docker build -t mytile -f docker/Dockerfile-server .

Requirements

Requires MariaDB 10.4.8 or newer.

Inside MariaDB Source Tree

git clone git@github.com:MariaDB/server.git -b mariadb-10.5.8
cd server
git submodule add https://github.com/TileDB-Inc/TileDB-MariaDB.git storage/mytile
mkdir build && cd build
cmake ..
make -j4

Running Unit Test

Once MariaDB has been build you can run unit tests from the build directory:

./mysql-test/mtr --suite mytile

That will run all unit tests defined for mytile

Features

Known Issues