This getting started guide provides a docker-compose
file to set up Trino with Apache Polaris. Apache Polaris is configured as an Iceberg REST Catalog in Trino.
To start the docker-compose
file, run this command from the repo's root directory:
docker-compose -f getting-started/trino/docker-compose.yml up
To access the Trino CLI, run this command:
docker exec -it trino-trino-1 trino
Note, trino-trino-1
is the name of the Docker container.
Example Trino queries:
SHOW CATALOGS;
SHOW SCHEMAS FROM iceberg;
SHOW TABLES FROM iceberg.information_schema;
DESCRIBE iceberg.information_schema.tables;
CREATE SCHEMA iceberg.tpch;
CREATE TABLE iceberg.tpch.test_polaris AS SELECT 1 x;
SELECT * FROM iceberg.tpch.test_polaris;
The Polaris catalog setup script uses the credential principal:root;realm:default-realm
. This credential is used so users do not need to fetch credentials from Apache Polaris' console output.
An example catalog is created in Apache Polaris using the curl
command. See create-polaris-catalog.sh
for details.