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

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

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-0.18.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_duckdb-0.18.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt-duckdb-0.18.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for dbt-duckdb-0.18.1.tar.gz
Algorithm Hash digest
SHA256 170464f80aacc8d207af55323d7e9e8766ab6acc8d1e3a194f36251a509dba75
MD5 a31cca4207766cf1675c86733fb110d3
BLAKE2b-256 2a908754b4cda9f6790febe5b0675a222a522fcd3325b425e8b82a826a74e4f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_duckdb-0.18.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for dbt_duckdb-0.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 714ffe00c958f167bf6b5dc1343cb80ca5979b54c300215d97b12462d1d7b95f
MD5 84e57abb83eaf378305073e28c3d8cfb
BLAKE2b-256 544c45698071243a84df2966093b84499b3a798833e1b0bd1a11b4237609ee09

See more details on using hashes here.

Supported by

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