dbt

Configure dbt models for Treasure Data Trino with API-key authentication.

21|24|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/treasure-data/td-skills --skill dbt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dbt
Source: https://github.com/treasure-data/td-skills/tree/main/workflow-skills/dbt
Command: npx skills add https://github.com/treasure-data/td-skills --skill dbt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dbt-core, dbt-trino, and includes macros (resource) components.

What problem does it solve?

This Skill provides expert guidance for using dbt (data build tool) with Treasure Data Trino, solving the complexity of setting up, configuring, and optimizing data transformations. It helps users overcome common issues like Trino adapter incompatibilities and ensures efficient, reliable data pipelines.

Core Features & Use Cases

  • TD-Specific Setup: Guides on installing dbt, configuring profiles.yml and dbt_project.yml for Treasure Data Trino, ensuring a smooth integration.
  • Macro Overrides: Provides essential dbt-trino macro overrides to ensure compatibility with TD's Trino engine, preventing common errors like "This connector does not support creating views."
  • Incremental Models: Offers patterns and macros for building efficient incremental models using TD_INTERVAL to process only new data, saving time and compute resources.
  • Use Case: A data engineer needs to build a robust daily ETL pipeline that transforms raw event data into aggregated metrics. This skill helps them set up dbt, define incremental models, and integrate with TD Workflows, ensuring data is processed efficiently and reliably every day.

Quick Start

Install dbt and connect to TD

uv pip install dbt-core dbt-trino==1.9.3

Configure profiles.yml with your TD API key

Then, in your dbt project directory, run:

dbt debug dbt run

Frequently Asked Questions about dbt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up dbt with Treasure Data Trino?

Set up dbt with Treasure Data Trino by installing dbt-core and dbt-trino, configuring profiles.yml with your TD API key and Trino endpoint, and running dbt debug to verify the connection. This ensures your dbt project can authenticate and execute queries against Treasure Data's Trino engine.

Why does dbt fail with 'This connector does not support creating views' on Treasure Data?

Trino's default adapter lacks support for view creation on Treasure Data. This Skill provides essential macro overrides that replace the CREATE VIEW logic, enabling dbt models to run without adapter incompatibility errors on Treasure Data Trino.

Can I build incremental models with dbt on Treasure Data Trino?

Yes, dbt supports incremental models on Treasure Data Trino using TD_INTERVAL to process only new data since the last run. This pattern reduces compute time and costs by avoiding full dataset reprocessing on each transformation cycle.

What dependencies do I need to run dbt against Treasure Data?

You need dbt-core and dbt-trino (version 1.9.3 or compatible) installed, an active Treasure Data account with API key credentials, and the proper profiles.yml configuration. These prerequisites enable dbt to authenticate and execute data transformations on Treasure Data's Trino infrastructure.

How do I deploy dbt workflows to Treasure Data?

Deploy dbt workflows to Treasure Data using a Docker-based pipeline that runs dbt commands (dbt run, dbt test) on a schedule. This orchestration approach integrates dbt model execution with Treasure Data Workflows for automated, reliable data transformation pipelines.

Does dbt work with Treasure Data's Trino dialect for ETL pipelines?

Yes, dbt integrates with Treasure Data Trino for building scalable ETL pipelines that transform raw data into aggregated metrics. The Skill provides configuration, macro patterns, and deployment guidance specific to Treasure Data's Trino SQL dialect and API authentication.