Skip to main content

The duckdb adpter plugin for dbt (data build tool)

Project description

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.1 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt-duckdb-1.0.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

dbt_duckdb-1.0.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file dbt-duckdb-1.0.2.tar.gz.

File metadata

  • Download URL: dbt-duckdb-1.0.2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for dbt-duckdb-1.0.2.tar.gz
Algorithm Hash digest
SHA256 468c3a4235270f474a2fc367b05a29faae7d3b0462753b624df80e7c09dc26f2
MD5 7de35e75a61696c9eee2368a11c1315e
BLAKE2b-256 1f47fc1d84128b4705113fcdd93fd4b7ae4c345ab2ca03e7fb9b23bb29e8fb38

See more details on using hashes here.

File details

Details for the file dbt_duckdb-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: dbt_duckdb-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for dbt_duckdb-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6da9384b1e7b09d7d302d96a05eff9ab360a257bfed90a6abafdee87398bb2ac
MD5 21daf6eca92663f94cf31c9c1e49065f
BLAKE2b-256 0e6aa27c4465feeab3d19c76c24c654ffc01d84313721d327383c3f45cbc463a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page