dbt Integration

Browse dbt models, explore lineage, search documentation, and even create or edit models through natural language — all backed by your dbt manifest and catalog.


Setup

The dbt integration requires two things:

  1. dbt artifactsmanifest.json and catalog.json from a dbt docs generate run
  2. A connected repository — for editing models (optional, see Repository Management)

Syncing artifacts from GCS

If your CI/CD pipeline uploads dbt artifacts to Google Cloud Storage, configure automatic sync:

  1. Go to Admin → dbt
  2. Enter the GCS bucket URL (e.g. gs://my-bucket/dbt-artifacts/)
  3. Click Sync to download and load the artifacts

The bot reloads artifacts in memory without a restart. You can also set up a scheduled task to auto-sync periodically.

What You Can Ask

  • "List all models in the staging layer"
  • "Show me the schema for stg_orders"
  • "What are the upstream dependencies of fct_revenue?"
  • "Find models related to customer lifetime value"
  • "Create a new model that joins orders with customers"

Available Tools

list_models

Search and list dbt models by name or keyword. Returns model name, materialization, schema, and description.

get_model_details

Full metadata for a specific model: description, materialization, database location, columns with types and documentation, upstream/downstream dependencies, and file path.

get_model_lineage

Visualize the dependency graph upstream and downstream of a model, with configurable depth (default: 2 levels).

search_knowledge

Semantic search across all models using natural language. Finds models by meaning, not just name matching.

create_dbt_model

Create a new model file with SQL, description, and optional tests. Creates a feature branch and stages the files for commit.

edit_dbt_model

Modify an existing model's SQL. Stages the changes on a feature branch. Must be followed by a git commit.

reload_dbt_docs

Reload artifacts from disk after running dbt docs generate or syncing from GCS.

Editing Workflow

When you ask the bot to create or edit a model, it follows a git-based workflow:

  1. Creates a feature branch (e.g. databot/edit_stg_orders)
  2. Makes the changes and stages files
  3. Commits with a descriptive message
  4. Optionally opens a pull request

This requires a write-enabled repository connection (see Repository Management).

Business Context

In Admin → dbt, you can customize the business context documentation that the bot uses to understand your naming conventions (e.g. r_ for raw,stg_ for staging, i_ for intermediate).