Skip to content

Commit

Permalink
run tests against dbcrossbar/dbt-trino trino
Browse files Browse the repository at this point in the history
Update to a newer and more complete trino install.

Co-Authored-By: Eric Kidd <[email protected]>
  • Loading branch information
hanakslr and emk committed Dec 5, 2024
1 parent e6d6cb1 commit 00e6a76
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ trino-image: trino-plugin

# Run our Trino image.
docker-run-trino: trino-image
docker run --name trino-joinery -p 8080:8080 -d trino-joinery
docker exec trino-joinery install-udfs
(cd trino && docker compose up)
docker compose exec trino install-udfs

# Stop and delete our Trino container.
docker-rm-trino:
docker rm -f trino-joinery
(cd trino && docker compose stop && docker compose rm)

# Verify that our image works.
check:
Expand All @@ -35,8 +35,8 @@ check:

# Check Trino. Assumes `docker-run-trino` has been run.
check-trino:
cargo run -- sql-test --database "trino://anyone@localhost/memory/default" ./tests/sql/
cargo run -- sql-test --database "trino://admin@localhost/memory/default" ./tests/sql/

# Access a Trino shell.
trino-shell:
docker exec -it trino-joinery trino
docker compose exec trino-joinery trino
2 changes: 1 addition & 1 deletion docker/trino/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A Dockerfile which builds a Trino image with our UDFs.

# Use the official Trino image as the base image.
FROM trinodb/trino:443
FROM trinodb/trino:460

# Copy ./java/trino-plugin/target/ to /usr/lib/trino/plugin/joinery.
ADD ./java/trino-plugin/target/ /usr/lib/trino/plugin/joinery
Expand Down
15 changes: 7 additions & 8 deletions trino/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
trino:
ports:
- "8080:8080"
image: "trinodb/trino:460"
image: trino-joinery:latest
volumes:
- ./docker/trino/etc:/usr/lib/trino/etc:ro
- ./docker/trino/catalog:/etc/trino/catalog
Expand All @@ -27,9 +27,9 @@ services:

hive-metastore:
hostname: hive-metastore
image: 'starburstdata/hive:3.1.2-e.18'
image: "starburstdata/hive:3.1.2-e.18"
ports:
- '9083:9083' # Metastore Thrift
- "9083:9083" # Metastore Thrift
environment:
HIVE_METASTORE_DRIVER: org.postgresql.Driver
HIVE_METASTORE_JDBC_URL: jdbc:postgresql://metastore_db:5432/metastore
Expand Down Expand Up @@ -60,19 +60,19 @@ services:

minio:
hostname: minio
image: 'minio/minio:RELEASE.2022-05-26T05-48-41Z'
image: "minio/minio:RELEASE.2022-05-26T05-48-41Z"
container_name: minio
ports:
- '9000:9000'
- '9001:9001'
- "9000:9000"
- "9001:9001"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data --console-address ":9001"

# This job will create the "datalake" bucket on Minio
mc-job:
image: 'minio/mc:RELEASE.2022-05-09T04-08-26Z'
image: "minio/mc:RELEASE.2022-05-09T04-08-26Z"
entrypoint: |
/bin/bash -c "
sleep 5;
Expand All @@ -85,4 +85,3 @@ services:
networks:
default:
name: trino-test

0 comments on commit 00e6a76

Please sign in to comment.