Chris Garrett Chris Garrett


35/M/UK

I'm Chris Garrett, a founder and entrepreneurial technologist working at the intersection of design and engineering.

Work with me

I help startups and established brands develop new digital products through my venture studio, C8VA, which specialises in early-stage product development and rapid prototyping.


MusicBrainz.duckdb

I use MusicBrainz dataset a lot across projects, so decided to distill their JSON dumps into a DuckDB database.

It’s a huge, and nested, dataset - but you can run trivial queries easily enough, directly against the object store:

INSTALL httpfs;
LOAD httpfs;

ATTACH 'https://musicbrainz-duckdb-store.lon1.digitaloceanspaces.com/musicbrainz.duckdb' AS mb (READ_ONLY);

SELECT
    date AS release_date,
    title AS release_title,
    barcode AS release_barcode,
    "artist-credit"[1].name AS primary_artist,
    status,
    country
FROM
    mb.release
WHERE
    "artist-credit"[1].name ILIKE 'Linkin Park'
ORDER BY
    date ASC;

For more complex use cases, you’ll want to pull it down and build out some custom tables locally - like if you’re working with tracks, because they’re nested under releases. This nicely gets me around rate limits on the hosted API, and saves me having to run an MB server too.

I’m opening this up as fully free/OSS as is permissable - but you should also consider the MusicBrainz data license if you use it.