dbt Connector Overview - Dune Docs

dbt Connector

The dbt Connector enables you to run production-grade dbt projects directly against Dune’s data warehouse using the dbt-trino adapter. Build, test, and deploy transformation pipelines with full support for incremental models, testing frameworks, and CI/CD orchestration. This connector provides write access to DuneSQL via a Trino API endpoint, enabling you to create, update, and manage tables in your private namespace while reading from Dune’s comprehensive blockchain datasets. Enterprise teams can also use dbt to publish transformed tables from Dune into a configured Datashare target. See dbt to Datashare.

dbt Template Repository
Get started quickly with our official dbt template repository, featuring example models for all model strategies and CI/CD workflows. Link

dbt to Datashare
Sync dbt-managed tables from your Dune namespace into Snowflake or BigQuery. Link

The dbt Connector is currently only available to Enterprise customers with Data Transformations enabled.

Interested in having the dbt Connector enabled for your team? Contact our team—please mention the dbt Connector when you reach out.

Credits & CI/CD
Each dbt run consumes Dune credits, including runs triggered by CI/CD pipelines. If you’re using GitHub Actions or similar tools, we recommend reviewing Pricing & Best Practices for optimization tips and CI/CD & Workflows for guidance on configuring triggers.

Video Tutorial

Watch this step-by-step guide to get started with the dbt Connector on Dune:
Tutorial: How to run dbt projects directly on Dune

What is dbt?

dbt (data build tool) is the industry-standard framework for analytics engineering. It enables data teams to transform raw data into analysis-ready datasets using SQL and software engineering best practices.

Key capabilities:

dbt Documentation
Learn more about dbt’s features, best practices, and advanced capabilities in the official dbt documentation.

Why dbt on Dune?

Enterprise-Grade Transformations

Seamless Integration

No Spellbook Dependency

Connection Details

Connect to Dune using these parameters:

Parameter Value
Host trino.api.dune.com
Port 443
Protocol HTTPS
Catalog dune (required)
Authentication JWT (use your Dune API key)
Session Property transformations=true (required for write operations)

The session property transformations=true is required for all write operations. Without it, DDL and DML statements will be rejected.

Use Cases

Enterprise Data Pipelines

Add Dune to your existing data infrastructure without reworking your workflows:

Governance & Compliance

Meet enterprise requirements for data control and auditability:

Complex Analytics Workflows

Build sophisticated multi-stage data pipelines:

Alternative to Spellbook

Build and maintain custom datasets without community review processes:

Next Steps

SQLMesh Compatibility

SQLMesh also works out of the box with Dune using the same Trino connection approach described above. If you prefer SQLMesh over dbt for your data transformation workflows, you can connect it to Dune using the SQLMesh Trino adapter with the same connection parameters. We plan to release a dedicated SQLMesh template in the future. Until then, follow the same connection setup (host, port, authentication, and session properties) to get started with SQLMesh on Dune.