Skip to content

Commit ca27297

Browse files
committed
add README
1 parent 9c2be7f commit ca27297

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

getting-started/trino/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Getting Started with Trino and Apache Polaris
21+
22+
This getting started guide provides a docker-compose file to set up [Trino](https://trino.io/) with Apache Polaris. Apache Polaris is configured as an Iceberg REST Catalog in Trino.
23+
24+
## Run the docker-compose file
25+
To start the docker-compose file, run this command from the repo's root directory:
26+
```
27+
docker-compose -f getting-started/trino/docker-compose-trino.yml up
28+
```
29+
30+
## Run Trino queries via Trino ClI
31+
To access the Trino CLI, run this command
32+
```
33+
docker exec -it trino-trino-1 trino
34+
```
35+
Note, `trino-trino-1` is the name docker container.
36+
37+
Example Trino queries:
38+
```
39+
SHOW CATALOGS;
40+
SHOW SCHEMAS FROM iceberg;
41+
SHOW TABLES FROM iceberg.information_schema;
42+
DESCRIBE iceberg.information_schema.tables;
43+
44+
CREATE SCHEMA iceberg.tpch;
45+
CREATE TABLE iceberg.tpch.test_polaris AS SELECT 1 x;
46+
SELECT * FROM iceberg.tpch.test_polaris;
47+
```
48+
49+
## Note
50+
The polaris catalog setup script use the credential `principal:root;realm:default-realm`. This credential is used so users do not need to fetch credentials from Apache Polaris' console output.
51+
52+
An example catalog is created in Apache Polaris using the `curl` command. See `create-polaris-catalog.sh` for details.

0 commit comments

Comments
 (0)