<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/getting-started-with-dbt-2coq6boat" -->

---
title: Getting started with dbt | daily.dev
description: A beginner-friendly walkthrough of dbt (data build tool), covering why analytics teams adopt it, how to install dbt Core with a local DuckDB database, and how...
canonical: https://daily.dev/posts/getting-started-with-dbt-2coq6boat
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Getting started with dbt | daily.dev
og:description: A beginner-friendly walkthrough of dbt (data build tool), covering why analytics teams adopt it, how to install dbt Core with a local DuckDB database, and how...
og:url: https://daily.dev/posts/getting-started-with-dbt-2coq6boat
og:image: https://api.daily.dev/og/posts/2cOQ6BoaT.png
og:image:alt: Getting started with dbt
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with dbt

**[Towards Data Science](https://daily.dev/sources/tds)** · 29 min read · 1 upvotes · 0 comments

## Summary

A beginner-friendly walkthrough of dbt (data build tool), covering why analytics teams adopt it, how to install dbt Core with a local DuckDB database, and how to create models and sources. Demonstrates writing a SQL model referencing a source table, running dbt run and dbt build, using built-in tests like not_null and accepted_values to catch data quality issues, and generating project documentation with dbt docs generate and dbt docs serve. Ends with pointers to further topics like incremental models, Jinja, macros, snapshots, and packages.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/getting-started-with-dbt>

## Questions this post answers

### How do I set up a dbt project locally using DuckDB as the database?

Install dbt with pip using the one-file DuckDB adapter package, then run dbt init to scaffold a project, choosing duckdb as the target database. This creates a profiles.yml file storing connection details such as the database path and schema, which can be edited to point to a custom data file location, plus a project folder with model directories.

_Developers setting up their first dbt project can find setup walkthroughs like this on daily.dev._

### What are the built-in data tests available in dbt?

dbt provides four built-in test types: unique, not_null, relationships, and accepted_values. These are defined in YAML alongside models and sources and can run via dbt test or as part of dbt build, which runs models and tests together in dependency order; failed tests cause downstream models to be skipped during a build.

_Teams deciding how to validate SQL transformations can track testing approaches like these on daily.dev._

### What is the difference between a dbt model and a dbt source?

A model is a SQL file that dbt uses to create a new table or view in the target database, while a source is an existing table dbt did not create, such as raw ingested data, referenced through a YAML configuration file. Using source() references in SQL means a renamed underlying table only requires updating the source file rather than every dependent script.

_Engineers structuring SQL transformation pipelines can find explainers like this on daily.dev._

## Similar posts on daily.dev

- [Building dbt Pipelines with Snowflake Cortex Code: A Hands-On Guide](https://daily.dev/posts/building-dbt-pipelines-with-snowflake-cortex-code-a-hands-on-guide-0iafhtdjm) · Snowflake Community · 0 upvotes · 0 comments
- [Comparing R’s \{targets\} and dbt for Data Engineering](https://daily.dev/posts/comparing-r-s-targets-and-dbt-for-data-engineering-s2ck8u60x) · R-bloggers · 0 upvotes · 0 comments
- [I Thought Loading Data Was the Finish Line. It Was the Starting Point.](https://daily.dev/posts/i-thought-loading-data-was-the-finish-line-it-was-the-starting-point--vwtdmjd3e) · Towards Data Science · 1 upvotes · 0 comments
- [DuckDB Now Ships inside dbt v2](https://daily.dev/posts/duckdb-now-ships-inside-dbt-v2-shfnzboxx) · DuckDB · 2 upvotes · 0 comments

---

Tags: [#sql](https://daily.dev/tags/sql), [#data-engineering](https://daily.dev/tags/data-engineering), [#duckdb](https://daily.dev/tags/duckdb)

[View this post on daily.dev](https://daily.dev/posts/getting-started-with-dbt-2coq6boat)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Getting started with dbt","url":"https://daily.dev/posts/getting-started-with-dbt-2coq6boat","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/getting-started-with-dbt-2coq6boat"},"datePublished":"2026-09-09T16:08:59.979Z","dateModified":"2026-09-14T06:20:50.699Z","description":"A beginner-friendly walkthrough of dbt (data build tool), covering why analytics teams adopt it, how to install dbt Core with a local DuckDB database, and how...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2389deb0da6478f7c1141eba2e4f079b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2389deb0da6478f7c1141eba2e4f079b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/getting-started-with-dbt-2coq6boat","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"sql,data-engineering,duckdb","timeRequired":"PT29M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"Getting started with dbt"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/getting-started-with-dbt-2coq6boat#faq","mainEntity":[{"@type":"Question","name":"How do I set up a dbt project locally using DuckDB as the database?","acceptedAnswer":{"@type":"Answer","text":"Install dbt with pip using the one-file DuckDB adapter package, then run dbt init to scaffold a project, choosing duckdb as the target database. This creates a profiles.yml file storing connection details such as the database path and schema, which can be edited to point to a custom data file location, plus a project folder with model directories. Developers setting up their first dbt project can find setup walkthroughs like this on daily.dev."}},{"@type":"Question","name":"What are the built-in data tests available in dbt?","acceptedAnswer":{"@type":"Answer","text":"dbt provides four built-in test types: unique, not_null, relationships, and accepted_values. These are defined in YAML alongside models and sources and can run via dbt test or as part of dbt build, which runs models and tests together in dependency order; failed tests cause downstream models to be skipped during a build. Teams deciding how to validate SQL transformations can track testing approaches like these on daily.dev."}},{"@type":"Question","name":"What is the difference between a dbt model and a dbt source?","acceptedAnswer":{"@type":"Answer","text":"A model is a SQL file that dbt uses to create a new table or view in the target database, while a source is an existing table dbt did not create, such as raw ingested data, referenced through a YAML configuration file. Using source() references in SQL means a renamed underlying table only requires updating the source file rather than every dependent script. Engineers structuring SQL transformation pipelines can find explainers like this on daily.dev."}}]}
```

