📘 Introduction

When you build a dbt project, your models often power something important downstream: dashboards, reports, notebooks, applications, or machine learning workflows. But without documentation, it can be hard to answer a simple question: Which business assets depend on this dbt model? This is where dbt exposures are useful.

In this beginner-friendly tutorial, you will learn what dbt exposures are, why they matter, and how to define an exposure for a dashboard using an exposures.yml file.

📌
This topic is also useful for the dbt Analytics Engineering Certification, because exposures help you understand lineage, documentation, and how dbt connects technical models to business-facing assets.

💡 Why dbt exposures matter

A dbt exposure describes a downstream use of your dbt project.

For example, an exposure can represent:

  • A Power BI dashboard
  • A Tableau workbook
  • A Looker dashboard
  • A Jupyter notebook
  • A machine learning pipeline
  • An internal application

Exposures help teams understand how dbt models are used after they are built.

That is important because a model is rarely the final destination. Usually, it supports a report, a dashboard, a business process, or a data product.

With exposures, you can connect this downstream asset back to the dbt models it depends on.

💡
A dbt exposure does not create the dashboard or ML model for you. It documents that the downstream asset exists and shows which dbt models it depends on.

🧭 What are we implementing?

We will create a simple exposure for an executive sales dashboard.

The lineage will look like this:

dim_customers ┐
fct_orders    ├── Executive Sales Dashboard
fct_revenue   ┘

The dashboard is not built inside dbt. Instead, dbt documents that the dashboard depends on specific dbt models.

After creating the exposure, we will generate dbt docs and check that the exposure appears in the project lineage.

✅ Prerequisites

Before you begin, make sure you have:

☑️ A dbt project set up
☑️ Basic knowledge of dbt models
☑️ A few existing models such as dim_customers, fct_orders, or fct_revenue
☑️ dbt installed locally or available in dbt Cloud

You do not need to connect a real BI tool for this tutorial. We will use a placeholder dashboard URL so you can focus on the exposure structure.

CTA Image

If you’d like to dive deeper into dbt (data build tool), our book Building Modern Data Pipelines with dbt: From Raw Data to Gold Standard with the Medallion Architecture provides a hands-on guide to designing modern data pipelines. It covers dbt’s core concepts and best practices, including building Bronze, Silver, and Gold layers with the Medallion Architecture. It also serves as a hands-on study guide for the dbt Analytics Engineering Certification.

View on Amazon

📁1️⃣ Create an exposures file

In dbt, exposures are usually defined in a YAML file inside the models/ directory.

Create a file called exposures.yml:

models/
├── marts/
│   ├── dim_customers.sql
│   ├── fct_orders.sql
│   └── fct_revenue.sql
└── exposures.yml

You can also place the file deeper inside the models/ folder if that fits your project structure better.

📝2️⃣ Define the dashboard exposure

Add the following content to models/exposures.yml:

exposures:
  - name: executive_sales_dashboard
    label: Executive Sales Dashboard
    type: dashboard
    maturity: high
    url: https://bi-tool.example.com/dashboards/executive-sales
    description: >
      Executive dashboard used by leadership to monitor sales,
      revenue, and customer performance.
    depends_on:
      - ref('dim_customers')
      - ref('fct_orders')
      - ref('fct_revenue')
    owner:
      name: Analytics Team
      email: analytics@example.com

This exposure tells dbt that the Executive Sales Dashboard depends on three dbt models:

  • dim_customers
  • fct_orders
  • fct_revenue

The dashboard itself lives outside dbt, but dbt can now include it in documentation and lineage.

🎓
For certification preparation, focus on the purpose of exposures: they document downstream dependencies and make impact analysis easier.

🔍3️⃣ Understand the exposure fields

Let’s quickly walk through the most important fields.

FieldMeaning
nameThe unique exposure name. Use lowercase letters, numbers, and underscores.
labelA human-friendly name that can contain spaces and capital letters.
typeThe kind of downstream asset, such as dashboard, notebook, analysis, ml, or application.
maturityThe confidence level of the exposure, such as high, medium, or low.
urlA link to the dashboard, report, notebook, or application.
depends_onThe dbt resources that feed the exposure.
ownerThe person or team responsible for the exposure.

The most important part is depends_on. This creates the connection between your dbt models and the downstream asset.

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In