Skip to content

billwallis/billiam-database

Repository files navigation

uv Docker Python tests GitHub last commit

pre-commit.ci status DuckDB Metabase


Billiam's Database 🧙‍♂️

OLAP database project for life admin.

About

As part of my life admin, I keep track of:

  • Every transaction I make at an item level (since 2018-01-18)
  • On the job, what I'm working on every 15 minutes (since 2019-04-23)

Note that the job tracker is my daily-tracker project.

Setup

Since this is a personal project, I don't expect anyone else to do this, but I'm still documenting it for myself (I have a very, very bad memory).

Pre-requisites

This project requires the following three tools to be installed:

The required versions are specified in the badges at the top of this README.

Installation (SQLMesh)

After cloning the repo, install the dependencies and enable pre-commit:

uvx --from poethepoet poe install

This will install several packages, including the task runner Poe the Poet. The tasks are defined in the pyproject.toml file.

Pipeline changes need to be applied via a plan:

poe plan

...and the pipeline can be run with the run command:

poe run

Installation (Metabase)

Warning

The DuckDB driver for Metabase is a community driver. This means that it might not work in all circumstances.

Metabase is a tool for visualising data.

In this project, Metabase is run in a Docker container; run the following command:

# start
poe docker-up

# stop
poe docker-down

This will make Metabase available at:

Warning

There are two important notes about the current Metabase configuration:

  • Since DuckDB only supports one connection at a time, you can't use Metabase and run the pipelines at the same time.
  • The Metabase data is stored locally in the dockerfiles/metaduck-data directory so that it persists between container restarts.

About

OLAP database project for life admin.

Topics

Resources

Stars

Watchers

Forks

Contributors