Connection guide

Connect Trino

Trino connects to many backends through catalogs. Grant SELECT on the catalogs and schemas you need.

Configure user authentication

Add unitylayer_user via password.properties, LDAP, or OAuth.

-- Trino user authentication depends on your setup:
-- 
-- For file-based authentication:
-- 1. Edit etc/password.properties
-- 2. Add: unitylayer_user=your_secure_password
-- 
-- For LDAP authentication:
-- Ensure your LDAP server has a user 'unitylayer_user'
-- 
-- For OAuth/OIDC authentication:
-- Configure in etc/config.properties and ensure user exists
-- 
-- For other authentication methods, refer to Trino documentation

Grant catalog access

Configure catalog permissions for the user.

-- Grant access to catalogs (connectors)
-- This is typically configured in Trino's catalog configuration
-- 
-- Example for Hive catalog:
-- In etc/catalog/hive.properties, ensure proper permissions
-- 
-- For system catalog:
GRANT SELECT ON system.runtime.queries TO unitylayer_user;

Grant schema access

GRANT SELECT on schemas within catalogs.

-- Grant access to schemas in your catalog
-- Example for Hive catalog:
GRANT SELECT ON hive.your_schema.* TO unitylayer_user;
-- 
-- Or for all schemas in a catalog:
GRANT SELECT ON hive.*.* TO unitylayer_user;
-- 
-- Example for other catalogs (e.g., PostgreSQL):
GRANT SELECT ON postgresql.your_schema.* TO unitylayer_user;

Grant table read permissions

SELECT on tables and views.

-- Grant read access to specific tables
GRANT SELECT ON hive.your_schema.your_table TO unitylayer_user;
-- 
-- Or for all tables in a schema:
GRANT SELECT ON hive.your_schema.* TO unitylayer_user;
-- 
-- For views:
GRANT SELECT ON hive.your_schema.your_view TO unitylayer_user;

Configure system access (optional)

Access to system catalogs for metadata.

-- Grant access to system information (optional)
GRANT SELECT ON system.metadata.* TO unitylayer_user;
GRANT SELECT ON system.runtime.* TO unitylayer_user;

Verify connection

Test with Trino CLI.

-- Test connection with Trino CLI or client:
-- trino --server localhost:8080 --user unitylayer_user --catalog hive --schema your_schema
-- 
-- Or verify permissions:
SHOW GRANTS FOR unitylayer_user;
-- 
-- Test a simple query:
SELECT * FROM system.runtime.nodes;

When setup is complete, open Connect database in the data catalog to enter credentials and test the connection.