Skip to content

Validate Iceberg Catalog in Trino

Verify Iceberg Catalog

Connect to Trino start the Trino CLI (see Run Trino CLI for detailed connection steps).

SQL
1
2
3
-- List all available catalogs
SHOW CATALOGS;
-- Verify iceberg catalog is listed

Create and Access Iceberg Catalog Table

Before proceeding, create the required Iceberg catalog policies in the Privacera Portal. Add these policies to the privacera_trino service under Access Management → Resource Policies.

Create Schema

SQL
CREATE SCHEMA IF NOT EXISTS iceberg.test_schema;

Permission Details:

  • Trino Catalog: iceberg
  • Trino Schema: <SCHEMA_NAME>
  • Permissions: CREATE

Create Table

SQL
1
2
3
4
5
6
7
8
9
CREATE TABLE iceberg.test_schema.test_table (
  id INTEGER,
  name VARCHAR,
  created_at TIMESTAMP
)
WITH (
  location = 's3://your-bucket/iceberg/test_table/',
  format = 'PARQUET'
);

Permission Details:

  • Trino Catalog: iceberg
  • Trino Schema: <SCHEMA_NAME>
  • Trino Table: <TABLE_NAME>
  • Permissions: CREATE

Insert Data

SQL
1
2
3
4
INSERT INTO iceberg.test_schema.test_table
VALUES 
  (1, 'Test Record 1', current_timestamp),
  (2, 'Test Record 2', current_timestamp);

Permission Details:

  • Trino Catalog: iceberg
  • Trino Schema: <SCHEMA_NAME>
  • Trino Table: <TABLE_NAME>
  • Permissions: UPDATE

Select/Query Data

SQL
SELECT * FROM iceberg.test_schema.test_table;

Permission Details:

  • Trino Catalog: iceberg
  • Trino Schema: <SCHEMA_NAME>
  • Trino Table: <TABLE_NAME>
  • Trino Columns: <COLUMN_NAME>
  • Permissions: SELECT