Skip to content

Refocus README on docs.getdbt.com for setup and configuration#722

Closed
dataders wants to merge 3 commits into
duckdb:masterfrom
dataders:docs/point-readme-to-dbt-docs
Closed

Refocus README on docs.getdbt.com for setup and configuration#722
dataders wants to merge 3 commits into
duckdb:masterfrom
dataders:docs/point-readme-to-dbt-docs

Conversation

@dataders

Copy link
Copy Markdown
Contributor

Summary

This trims the README down so it primarily points readers to the maintained dbt documentation for setup, configuration, and general adapter usage.

It keeps the repository-specific material that still makes sense to live close to the source, especially:

  • configuring dbt-duckdb plugins
  • using module_paths
  • writing custom plugins
  • the short roadmap

Why

The README had grown into a second, partially duplicated copy of the adapter docs. That makes it easy for the README and the dbt docs site to drift.

The dbt docs updates that this PR is designed to point to are being proposed here:

Once those land, the docs site should be the primary place for:

  • DuckDB setup
  • DuckDB configuration reference
  • quickstart guidance
  • related dbt concepts like materializations, incremental models, and Python models

Changes

  • replace large setup/configuration walkthrough sections in README.md with links to docs.getdbt.com
  • retain plugin-specific guidance in the README
  • update the retained plugin dependency note for pyiceberg to Python >= 3.10

@dataders dataders left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick review

Comment thread README.md Outdated
Comment on lines 3 to 14
[DuckDB](http://duckdb.org) is an embedded database, similar to SQLite, but designed for OLAP-style analytics. It is fast and allows you to read and write data stored in CSV, JSON, and Parquet files directly, without requiring you to load them into the database first.

[dbt](http://getdbt.com) is the best way to manage a collection of data transformations written in SQL or Python for analytics
and data science. `dbt-duckdb` is the project that ties DuckDB and dbt together, allowing you to create a [Modern Data Stack In
A Box](https://duckdb.org/2022/10/12/modern-data-stack-in-a-box.html) or a simple and powerful data lakehouse with Python.
[dbt](http://getdbt.com) is a framework for managing data transformations written in SQL or Python for analytics and data science. `dbt-duckdb` is the adapter that ties DuckDB and dbt together, allowing you to build a [Modern Data Stack In A Box](https://duckdb.org/2022/10/12/modern-data-stack-in-a-box.html) or a local lakehouse with Python.

### Installation

This project is hosted on PyPI, so you should be able to install it and the necessary dependencies via:

`pip3 install dbt-duckdb`

The latest supported version targets `dbt-core` versions >= 1.8.x and `duckdb` version 1.1.x, but we work hard to ensure that newer
versions of DuckDB will continue to work with the adapter as they are released.
The latest supported version targets `dbt-core` versions >= 1.8.x and DuckDB version 1.1.x, but we work hard to ensure that newer versions of DuckDB continue to work with the adapter as they are released.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason to have touched these sections. editorial overreach!

Comment thread README.md Outdated
Comment on lines +22 to +24
- [Materializations](https://docs.getdbt.com/docs/build/materializations)
- [Incremental models](https://docs.getdbt.com/docs/build/incremental-models)
- [Python models](https://docs.getdbt.com/docs/build/python-models)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop these references

Comment thread README.md Outdated
Comment on lines +19 to +20
- [DuckDB setup](https://docs.getdbt.com/docs/local/connect-data-platform/duckdb-setup)
- [DuckDB configurations](https://docs.getdbt.com/reference/resource-configs/duckdb-configs)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [DuckDB setup](https://docs.getdbt.com/docs/local/connect-data-platform/duckdb-setup)
- [DuckDB configurations](https://docs.getdbt.com/reference/resource-configs/duckdb-configs)
- [connecting to DuckDB with dbt](https://docs.getdbt.com/docs/local/connect-data-platform/duckdb-setup)
- [configuring DuckDB with dbt](https://docs.getdbt.com/reference/resource-configs/duckdb-configs)

Comment thread README.md
Comment on lines -32 to -37
This will run your dbt-duckdb pipeline against an in-memory DuckDB database that will not be persisted after your run completes. This may
not seem very useful at first, but it turns out to be a powerful tool for a) testing out data pipelines, either locally or in CI jobs and
b) running data pipelines that operate purely on external CSV, Parquet, or JSON files. More details on how to work with external data files
in dbt-duckdb are provided in the docs on [reading and writing external files](#reading-and-writing-external-files).

To have your dbt pipeline persist relations in a DuckDB file, set the `path` field in your profile to the path

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we confident that this is represented already on the recently updated docs pages?

Comment thread README.md
MotherDuck databases generally work the same way as local DuckDB databases from the perspective of dbt, but
there are a [few differences to be aware of](https://motherduck.com/docs/architecture-and-capabilities#considerations-and-limitations):
1. MotherDuck is compatible with client DuckDB versions 0.10.2 and older.
1. MotherDuck preloads a set of the most common DuckDB extensions for you, but does not support loading custom extensions or user-defined functions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this mentioned on our docs pages?

Comment thread README.md
Comment on lines -558 to -595
models:
- name: my_incremental_model
config:
materialized: incremental
incremental_strategy: merge
unique_key: id # or ['id', 'date'] for composite keys
```

This generates SQL equivalent to:

```sql
MERGE INTO target AS DBT_INTERNAL_DEST
USING source AS DBT_INTERNAL_SOURCE
ON (DBT_INTERNAL_SOURCE.id = DBT_INTERNAL_DEST.id)
WHEN MATCHED THEN UPDATE BY NAME
WHEN NOT MATCHED THEN INSERT BY NAME
```
The `module_paths` profile setting lets you specify a list of filesystem paths containing additional Python modules. These paths are added to the dbt process's `sys.path`, which makes the modules importable within dbt. You can use this to include helper code in your project, such as custom `dbt-duckdb` plugins or shared libraries for Python models.

**Enhanced Configuration:**
### Writing your own plugins

These options extend the basic merge behavior with additional control over which records get updated or inserted, which columns are affected, and how values are set.

| Configuration | Type | Default | Description
| :---: | :---: | :---: | ---
| `unique_key` | string/list | required | Column(s) used for the MERGE join condition
| `incremental_predicates` | list | null | Additional SQL conditions to filter the MERGE operation
| `merge_on_using_columns` | list | null | Columns for USING clause syntax instead of ON for the join condition
| `merge_update_condition` | string | null | SQL condition to control when matched records are updated
| `merge_insert_condition` | string | null | SQL condition to control when unmatched records are inserted
| `merge_update_columns` | list | null | Specific columns to update
| `merge_exclude_columns` | list | null | Columns to exclude from updates
| `merge_update_set_expressions` | dict | null | Custom expressions for column updates
| `merge_returning_columns` | list | null | Columns to return from the MERGE operation

**Example with Enhanced Options:**

```yaml
models:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this interactive shell stuff stays in the repo

Comment thread README.md Outdated
Comment on lines +91 to +92
- Support for Delta and Iceberg external table formats, both as sources and destinations
- Make dbt incremental models and snapshots work with external materializations

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

editorial overreach!

@dataders

Copy link
Copy Markdown
Contributor Author

Addressed review in ff4b2f4.

Changes:

  • reverted the README intro/install wording to the existing text
  • reduced docs links to the two requested links
  • kept module_paths, custom plugin authoring, and the interactive shell in the repo README
  • kept the PR scoped to removing duplicated setup/configuration material rather than broader editorial changes

@dataders

Copy link
Copy Markdown
Contributor Author

Superseded by #723. Reopened from a fresh branch because GitHub kept showing a stale conflict state on this PR.

@dataders dataders closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant