
Trino/Presto client → Dune connector → Dune Query Engine
The DuneSQL Trino Connector is currently only available to Plus, Premium and Enterprise customers.
Compatible Tools
Dune’s Trino connector supports any tool that works with Trino, Presto, or Starburst connectors. Popular Dune integrations include:Hex
Connect Dune to Hex’s notebook-native analytics via built-in Trino connector.
Metabase
Integrate Dune with Metabase using the Starburst/Trino driver for BI dashboards.
DBeaver
Connect Dune to DBeaver using the Trino driver for direct SQL access to blockchain data.
Any Trino/Presto/Starburst client
Treat Dune like a Database in your language of choice with popular Trino
libraries.
Any of the supported client applications listed in the Trino ecosystem are supported. Please visit their documentation to learn about their specific connection instructions, though the configuration should generally follow the same pattern using the connection parameters below.
Connection Parameters
Use these values in your Trino, Presto, or Starburst client configuration:Parameter | Value | Description |
---|---|---|
Host | dune-api-trino.dune.com | Dune’s Trino/Presto endpoint |
Port | 443 | Standard HTTPS port |
Username | dune | Fixed username for all connections |
Password | <your-dune-api-key> | Your Dune API key |
Catalog | delta_prod | Main data catalog |
SSL/TLS | true | Always use encrypted connections |
HTTP scheme | https | Required for secure connections |
If you need an API key, see our guide on
Authentication. Remember to keep
your API keys secret and rotate them immediately if they are ever exposed.
Hex Setup for Dune
Follow these steps to connect Dune as a data source in your Hex workspace.Add the Data Connection
1
Open Data sources
Under Workspace settings, select Data sources.

2
Add connection and choose Trino
Click the green + Connection button, then select Trino from
the list of available connections.

3
Enter connection details
Fill in the form fields using the values from the
Connection Parameters section.

Run a Test Query
Once your data source is configured, you can query it directly from any Hex project.1
Open or create a project
Open an existing project or create a new one.
2
Add a SQL cell
Add a new SQL cell to your notebook.
3
Select data source
In the data source dropdown at the top of the cell, select your newly
created Dune SQL connection.
4
Paste and run SQL
Paste the example query below into the cell and run it.

Metabase Setup for Dune
Follow these steps to connect Dune as a data source in Metabase.Add the Database Connection
1
Open Admin settings
From the Metabase home page, click the Settings gear icon in the top-right corner.
Select Admin settings from the dropdown menu.

2
Go to Databases
In the Admin panel, navigate to the Databases tab.

3
Add database
Click the blue Add database button to open the configuration modal.

4
Choose driver
In the modal, select
Starburst (Trino)
as the Database type.5
Enter connection details
Fill in the form fields using the values from the Connection Parameters section.
For best performance in Metabase, we recommend disabling Rerun queries for simple explorations and Periodically refingerprint tables in the advanced settings.
Schema discovery queries such as
SHOW TABLES
or
SHOW SCHEMAS
may not be available in Metabase with this connector
because Dune’s catalog spans millions of tables. Many BI tools are not yet
optimized to enumerate catalogs at this scale. An update with improved schema
discovery is planned for the future.Run a Test Query
After configuring and saving the connection, you can run a query to verify that everything is working.1
Create a new SQL query
Click the + New button and select SQL query.
2
Select database
In the editor, choose your newly created Dune SQL data source from
the Select a database dropdown.
3
Paste example SQL
Paste the example query below into the editor.
4
Run the query
Run the query to verify the connection.
DBeaver Setup for Dune
Follow these steps to connect Dune as a data source in DBeaver.Add a Database Connection
1
Create new connection
In DBeaver, click the New Database Connection button. It usually looks like a plug with a plus on it.
2
Select Trino database
You’ll be taken to the “Connect to a database” screen. Find and select Trino from the list of accepted databases, then click on it.

3
Configure connection details
You’ll be taken to a screen where you can fill in your connection details. Make sure to click Connect by host, then fill in the connection parameters using the values from the Connection Parameters section.

4
Finish connection setup
Once you have all the details filled out properly, click Finish to create the connection.
Run a Test Query
After configuring your connection, you can run a query to verify that everything is working.1
Open SQL editor
Right-click on your Dune database connection and navigate to the SQL Editor section. This will open up a new SQL editor.
2
Write your SQL query
In the SQL editor, you can write all of your Dune-compatible SQL. Paste the example query below into the editor.
3
Run the script
Click the Run button to execute your script. If everything went well, you will see the results displayed in the results panel.

Using Trino SDKs directly in your code
Connect to Dune using Trino SDKs in your preferred language.Besides the code samples shown above, Trino supports a variety of other official and unofficial SDKs. Please check the official Trino SDKs page to see which ones are available and to view their GitHub repositories for updated code samples and documentation.
Supported SQL Operations
Queries executed via the connector align with what you can run on the Dune platform. See the Query Engine overview for more information on supported functions and syntax.Rate Limits
Rate limits for the connector mirror those of the Dune Analytics API. Please refer to the Rate Limits documentation for details.Billing & Cost
All queries run via the connector are executed on the Large Query Engine and cost 20 Dune Credits per execution. In addition, fetching results consumes credits proportional to the number of datapoints returned. For a full breakdown, please see our documentation on Billing.Limitations
The connector currently has limited support for metadata discovery queries such asSHOW TABLES
or SHOW SCHEMAS
. This may impact the data source browsing and autocomplete experience within some BI tools.
For schema and table discovery, see the Data Explorer guide. If you encounter timeouts with large result sets, consider paginating your queries using LIMIT
and OFFSET
, narrowing your filters, or splitting complex queries into smaller, more manageable parts.