Trino is a distributed SQL query engine designed to query large data sets distributed over one or more heterogeneous data sources.
sudo docker build --build-arg "VERSION=351" -t "trino:1"
cd <navigate to trino-coordinator folder>
sudo docker build --build-arg VERSION=1 -t "trino-coordinator:1" .
cd <navigate to trino-worker folder>
sudo docker build --build-arg VERSION=1 -t "trino-worker:1" .
All the above commands are wrapped inside build.sh
sudo bash build.sh
# UP
sudo trino_VERSION=1 docker-compose up
# DOWN
sudo trino_VERSION=1 docker-compose down
Execute the trino-cli
./trino --server localhost:8080 --catalog mysql --schema default
Once the cli is open query the MySQL
SHOW SCHEMAS FROM mysql;
SHOW TABLES FROM mysql.accipiter_nisus_core_100_1;
SELECT * FROM mysql.accipiter_nisus_core_100_1.meta;
Execute Trino-cli
./trino --server localhost:8080 --catalog memsql --schema default
Once the cli is open query the MariaDB
SHOW SCHEMAS FROM memsql;
SHOW TABLES FROM memsql.accipiter_nisus_rnaseq_100_1;
SELECT * FROM memsql.accipiter_nisus_core_100_1.meta;
Trino retrieves data from two different data sources from the same query..
SELECT meta_mem.species_id as user_id, meta_mem.meta_key as username
FROM memsql.acanthochromis_polyacanthus_rnaseq_100_1.meta meta_mem
UNION ALL
SELECT meta_mysql.meta_id as user_id, 'test' as username
FROM mysql.accipiter_nisus_core_100_1.meta meta_mysql
Thanks ensembl for the public servers 😍