docker compose up -d
This will initialize iceberg
catalog in Trino.
There is a simple SQL script to initialize a test schema
in the iceberg
catalog by copying TPCH "tiny" schema from the Trino:
docker exec -it trino trino -f /home/trino/test-schema.sql
This is not required. It is possible to create other schemata in the iceberg
catalog and create and populate tables there in any way.
Connect to Trino CLI and execute queries:
docker exec -it trino trino
Inspect warehouse bucket contents: open Minio Admin panel
(user name: admin
password: password
).
SHOW SCHEMAS from iceberg;
SHOW TABLES from iceberg.test;
select * from iceberg.test.customer;
CREATE SCHEMA iceberg.demo;
CREATE TABLE iceberg.demo.taxis (
vendor_id bigint,
trip_id bigint,
trip_distance real,
fare_amount double,
store_and_fwd_flag varchar
)
WITH (
partitioning = ARRAY['vendor_id']
);
INSERT INTO iceberg.demo.taxis
VALUES (1, 1000371, 1.8, 15.32, 'N'), (2, 1000372, 2.5, 22.15, 'N'), (2, 1000373, 0.9, 9.01, 'N'), (1, 1000374, 8.4, 42.13, 'Y');
SELECT * FROM iceberg.demo.taxis;