All Connectors
Trino Connector
Trino Connector
Trino Connector
Connect to a Trino database and expose it to Hasura v3 Project
About
Version
Released
January 24, 2025
Last Updated
January 25, 2025
GitHub Repo

Trino Connector

Docs ndc-hub License Status

With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your data models in Trino. This connector supports Trino's functionalities listed in the table below, allowing for efficient and scalable data operations. Additionally, users benefit from all the powerful features of Hasura’s Data Delivery Network (DDN) platform, including query pushdown capabilities that delegate query operations to the database, thereby enhancing query optimization and performance.

This connector implements the Data Connector Spec.

Features

Below, you'll find a matrix of all supported features for the Trino connector:

FeatureSupportedNotes
Native Queries + Logical Models
Native Mutations
Simple Object Query
Filter / Search
Simple Aggregation
Sort
Paginate
Table Relationships
Views
Remote Relationships
Custom Fields
Mutations
Distinct
Enums
Naming Conventions
Default Values
User-defined Functions

Prerequisites

  1. Create a Hasura Cloud account
  2. Please ensure you have the DDN CLI and Docker installed
  3. Create a supergraph
  4. Create a subgraph

The steps below explain how to initialize and configure a connector on your local machine (typically for development purposes).You can learn how to deploy a connector to Hasura DDN — after it's been configured — here.

Using the Trino connector

With the context set for an existing subgraph, initialize the connector:

ddn connector init -i

When the wizard runs, you'll be prompted to enter the following env vars necessary for your connector to function:

NameDescriptionRequired
JDBC_URLThe JDBC URL to connect to the databaseYes

After the CLI initializes the connector, you'll need to:

Example JDBC Configuration

Supposing you have a MySQL datasource example_mysql in your Trino instance's catalog, and a database named chinook, you might use a JDBC URL of the format:

  • jdbc:trino://localhost:8080/example_mysql/chinook?user=trino

Ensure that your MySQL instance in the Trino catalog is configured with case-insensitive-name-matching=true for proper SQL query functionalty.

A full example might be:

connector.name=mysql
connection-url=jdbc:mysql://host.docker.internal:3306
connection-user=root
connection-password=Password123
unsupported-type-handling=convert-to-varchar
case-insensitive-name-matching=true

License

The Hasura Snowflake connector is available under the Apache License 2.0.

hasura-community-call

PromptQL: Data Agent on Hasura DDN that
gets you close to 100% accuracy on RAG

Ship a rock-solid API on your data – in minutes!