How it works
Formo’s query editor talks to two data warehouses:- Formo (ClickHouse) queries your analytics and profiles data; this is the default.
- Dune (Trino) queries on-chain data.
dune to query Dune. The table dune.ethereum.transactions queries as ethereum.transactions on Dune. See the Dune data catalog for a full list of tables.
Stick to one engine per query. Formo and Dune are separate databases,
so mixing
dune tables with Formo tables in the same query (e.g. a join)
isn’t meaningful. The editor shows a warning if it detects mixed engines,
but this is advisory: a cosmetic hint, not a rule the backend validates or
blocks.Add your Dune API key
Dune queries run against your Dune account, so you need to add your API key once per project.1
Get your API key
Create an API key in your Dune account settings at dune.com.
2
Add it in Formo
Go to Project Settings → Integrations, paste your key, and click Save. Formo validates the key against Dune and stores it encrypted.
Query Dune in the SQL Explorer
Open Explorer → Data, then write a query that references adune. table:
Build Dune charts
In the chart builder, write adune. query and save it like any other chart. Dune charts:
- show a Dune badge on the dashboard,
- load in the background (Dune queries can take up to 90 seconds, so they never block the rest of the board),
- require a Dune API key to be configured before you can save one.
Best practices
- Dialect. Dune uses Trino / DuneSQL (e.g.
date_trunc,approx_distinct), which differs from Formo’s ClickHouse SQL. - Speed. Dune queries are async and can take minutes, based on your plan.
- Cost. Query executions on your dashboard consume your Dune credits.