This demo contains 3 folders :
- duckdb-pypi : notebooks and sql to gives intro to DuckDB and play around the pypi dataset on MotherDuck
- md-dbt : same queries used from the above, to give an highlight on how duckdb/md and dbt works together
- md-evidence : for local snappy dashboard
You can find the videos of the demo here
See demo script on Notion
Requirements :
- VSCode & devcontainer extension
- Docker desktop
- A MotherDuck account & service token
- Copy queries that are in ./duckdb-pypi/motherduck_ui_queries.sql in the MotherDuck UI
Use the devcontainer feature from VSCode to load the container that will have all requirements :
- Python 3.11
- dbt/duckdb packages
- NodeJS (for Evidence dashboard)
- DuckDB CLI
- A parquet dataset downloaded from AWS S3 (in the
dataset
folder) of ~900MB
Open duckdb_intro.ipynb
in VSCode and go through the cells (intro duckdb, query Pypi data and connect to MotherDuck Cloud).
You can use the two make
commands
make dbt-local
: will run dbt/duckdb locally based on the parquet dataset present in./dataset
and output CSVs inmd-dbt/output
make dbt-md
: will run dbt/duckdb locally and push the data to MotherDuck under the databasemy_db
. You need to export first yourMOTHERDUCK_TOKEN
before running this!
You can use the make commands :
make evidence-install
: will install node packagesmake evidence-run
: will run a local server, dashboard will be accessible typically on port 3001.