Skip to content

Latest commit

 

History

History

trino

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Getting Started with Trino and Apache Polaris

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.

Run the docker-compose file

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 

Run Trino queries via Trino CLI

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;

Note

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.