Installation
Install the Trino connector:This connector works with both Trino and Presto query engines. Trino is the default.
Configuration
Configuration Parameters
Trino/Presto coordinator hostname
Coordinator port (443 for HTTPS, 8080 for HTTP)
Username for authentication
Password for basic authentication (optional)
Enable SSL/TLS. Must be true for HTTPS connections
Default catalog to query
Default schema within the catalog
Query engine type:
trino or prestoAuthentication
No Authentication
For development environments:connection.yaml
Basic Authentication
For production with password authentication:connection.yaml
Features
Type Mapping
Trino types are mapped to Evidence types:- Numbers: TINYINT, SMALLINT, INTEGER, BIGINT, REAL, DOUBLE, DECIMAL
- Strings: VARCHAR, CHAR, VARBINARY, JSON
- Dates: DATE, TIME, TIMESTAMP
- Booleans: BOOLEAN
Column Name Normalization
Column names are converted to lowercase and spaces are replaced with underscores.Multiple Catalogs
Query across different data sources using catalog prefixes:queries/cross_catalog.sql
Example Queries
Basic Query
queries/sales_analysis.sql
Federated Query
queries/federated.sql
Array and JSON Functions
queries/complex_types.sql
Catalogs and Connectors
Trino supports many data source connectors:- Hive: Hadoop/S3 data lakes
- PostgreSQL: PostgreSQL databases
- MySQL: MySQL databases
- Iceberg: Apache Iceberg tables
- Delta Lake: Delta Lake tables
- MongoDB: MongoDB collections
- Elasticsearch: Elasticsearch indexes
- Kafka: Kafka topics
Configure Catalogs
Catalogs are configured on the Trino coordinator. To query different catalogs, specify them in your queries:Performance Optimization
Partition Filtering
Always filter on partition columns:Use APPROX Functions
For faster approximate results:Limit Data Scans
Use Appropriate File Formats
For Hive tables, prefer columnar formats:- Parquet: Best for analytical queries
- ORC: Good for Hive integration
- Avoid CSV: Much slower for large-scale analytics
Presto Configuration
To use Presto instead of Trino, set the engine parameter:connection.yaml
The connector uses the same client library for both Trino and Presto. Most queries are compatible between the two engines.
Troubleshooting
Connection refused
Connection refused
- Verify host and port are correct
- Check if SSL is required (use
ssl: truefor HTTPS) - Ensure the Trino/Presto coordinator is running
- Check network connectivity and firewall rules
Authentication errors
Authentication errors
- Verify username and password are correct
- Check if the coordinator requires authentication
- For cloud deployments, ensure credentials haven’t expired
Catalog not found
Catalog not found
- Verify the catalog name is correct
- Check available catalogs:
SHOW CATALOGS - Ensure the catalog is configured on the coordinator
Schema or table not found
Schema or table not found
- Check the schema exists:
SHOW SCHEMAS IN catalog_name - List tables:
SHOW TABLES IN catalog.schema - Verify permissions to access the schema/table
Slow query performance
Slow query performance
- Filter on partition columns when possible
- Check query execution plan:
EXPLAIN SELECT ... - Use APPROX functions for faster aggregations
- Verify data is in columnar format (Parquet/ORC)
- Consider adding partition columns to large tables
SSL/TLS errors
SSL/TLS errors
For HTTPS connections, ensure:For HTTP connections:
Advanced Features
Query Federation
Join data across multiple systems in a single query:queries/federation.sql
Time Travel (Iceberg/Delta)
Query historical versions of tables:queries/time_travel.sql
Geospatial Queries
queries/geospatial.sql