Getting Started with Trino Destination Configuration

Requirements:

  • Active Trino cluster.
  • Allow connections from Databrain to your Trino cluster.
    For details on setting up IP whitelisting and ensuring secure connectivity, refer to our guide on:

Allow Access to our IP

  • Choose the Databrain Workspace to which you wish to connect the data.

Setup Guide:

  1. Ensure Cluster Accessibility:
    • Make sure your Trino cluster is active and accessible from the machine running Databrain.
    • This is dependent on your networking setup. The easiest way to verify if Databrain is able to connect to your Trino cluster is via the Add a Data Source UI.
    • For a deeper dive on configuring your cluster’s access, you can consult the Trino documentation.
  2. Grant Necessary Permissions:
    • Read Access on Tables and Catalogs: Grant read access permissions to the tables within Trino as well as the system information schema. This allows Databrain to retrieve necessary information and replicate data accurately. You can assign appropriate permissions to the user or role accessing Trino to enable reading from tables and accessing metadata.
    • Grant SELECT permission on all tables in the specified schema:
      GRANT SELECT ON schema_name.* TO USER your_user;
    • Grant access to system information views:
      GRANT SELECT ON system.information_schema.* TO USER your_user;
  3. Fill Up Connection Information: Provide the necessary information to connect to your cluster:
    • Host/Server: The hostname or IP address of your Trino coordinator
    • Port: e.g., 8080 (HTTP) or 8443 (HTTPS)
    • Catalog: The catalog you want to connect to (e.g., hive, postgresql, mysql)
    • Schema: The default schema within the catalog (e.g., default)
    • Username: Username to access the database
    • Password: Password associated with the username (if authentication is enabled)
    • SSL/TLS: Specify if SSL/TLS encryption is required for the connection
    Note on Catalog and Schema Configuration:
    • Catalog: Trino uses catalogs to organize data sources. Each catalog represents a connection to a data source like Hive, PostgreSQL, etc.
    • Default Schema: This is the default schema tables are accessed from if not explicitly specified. Common values include default or public.

Encryption:

  • Trino supports TLS/SSL encryption for secure connections. Configure HTTPS on port 8443 if encryption is required.
  • For private instances, additional network security configurations should be in place for authentication purposes along with Trino credentials.

Permissions:

  • Permission to read system information schema
  • Whitelist the IP address
  • Grant read access to the catalog and schema, noting that access to only tables may not suffice for proper metadata retrieval.
Replace the placeholders inside the square brackets with actual values when filling in the details.

Locating the Configuration Details in Trino

  1. Destination Name
    • This is a custom name you decide for identification within Databrain. Choose a descriptive name based on your use case.
  2. Host/Server
    • This is the hostname or IP address where your Trino coordinator is running.
    • Check your Trino deployment configuration or consult with your infrastructure team.
  3. Port
    • Typically, this is 8080 for HTTP or 8443 for HTTPS connections. Confirm this in your Trino coordinator configuration.
  4. Catalog
    • Catalogs are defined in your Trino configuration files. Common catalogs include hive, postgresql, mysql, mongodb, etc.
    • You can view available catalogs by running SHOW CATALOGS in the Trino CLI or web UI.
  5. Schema
    • Schemas are specific to each catalog. For Hive catalogs, common schemas include default.
    • You can view available schemas by running SHOW SCHEMAS FROM catalog_name in Trino.
  6. Username & Password
    • These depend on your authentication configuration. Trino supports various authentication methods including LDAP, Kerberos, and password files.
    • Consult your Trino administrator or authentication configuration for the correct credentials.
  7. SSL/TLS
    • Check your Trino coordinator configuration to determine if HTTPS is enabled and required for connections.
    • If using HTTPS, ensure you’re connecting to the correct port (typically 8443) and have proper certificates configured.