Skip to main content

dbt-duckdb

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 1.0.0 and duckdb 0.3.1.

Configuring your profile

DuckDB is an embedded database, similar to SQLite, but designed for OLAP-style analytics instead of OLTP. The only configuration parameter that is required in your profile (in addition to type: duckdb) is the path field, which should refer to a path on your local filesystem where you would like the DuckDB database file (and it's associated write-ahead log) to be written. You can also specify the schema parameter if you would like to use a schema besides the default (which is called main).

There is also a database field defined in the DuckDBCredentials class for consistency with the parent Credentials class, but it defaults to main and setting it to be something else will likely cause strange things to happen that I cannot fully predict, so, ya know, don't do that.

Developer Workflow

If you find that you need to add a feature to DuckDB in order to implement some functionality in dbt-duckdb, here is the workflow you can use for doing local development. First, you need to clone and build DuckDB from source:

$ git clone https://github.com/cwida/duckdb.git
$ cd duckdb
$ pip3 install -e tools/pythonpkg

in order to do a local install off of the main branch, and then run:

$ git clone https://github.com/jwills/dbt-duckdb.git
$ cd dbt-duckdb
$ pip3 install .

to install dbt-duckdb, at which point you will be able to run:

$ pip3 install pytest-dbt-adapter
$ pytest test/duckdb.dbtspec

to exercise the dbt-adapter-tests locally against your build of DuckDB (note that you also need to update setup.py in this directory to ensure that you are using your local version of duckdb, and not the released duckdb version 0.3.1)

Release files for dbt-duckdb 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbt-duckdb 1.0.1
File Size Uploaded
dbt-duckdb-1.0.1.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dbt-duckdb 1.0.1
File Interpreter ABI Platform
dbt_duckdb-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / dbt-duckdb-1.0.1.tar.gz

Download URL dbt-duckdb-1.0.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b1008846727bba6a39996b4a16a2a241b0c729e2fe31572faac57c0d8a25b567
BLAKE2b-256 checksum
How to use checksums
394e97be69f43db5b13541c6db0d3a6a4e72dbfa9ed8295e3ceed919a4afe807
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.7.0 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

Release files / dbt_duckdb-1.0.1-py3-none-any.whl

Download URL dbt_duckdb-1.0.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
457cd1daba85b6f031ce2fc7091c5a678aaf16197b35647ffdcb0fc7d370f5fa
BLAKE2b-256 checksum
How to use checksums
b545313da253c8595dbff9ec1418f56e9dd37f36843c97609f5e13f86140b526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.7.0 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

Release history Release notifications | RSS feed

1.10.1

2 release files

1.9.6

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.5

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

1 release file

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page