Skip to content

Personal Warehouse

You'll put every export about your life, from bank to health to calendar to media, into one database with a schema you drew, a loader that reruns, and twenty questions answered across sources.

About

Your bank, your phone, your watch, your calendar, your music app and your email all let you export your data, and almost nobody does it. Put four or more of them into one SQLite, DuckDB or Postgres database with a schema you drew and you can ask questions no app will ever answer: what do I spend on days I sleep badly, how far do I travel in the months I'm busiest, which friends do I actually see. This badge is building that warehouse and keeping it fed for three months, with a loader that rebuilds every table from the exports folder in one run, because the second refresh is where a hand-loaded database quietly dies. What counts is four or more sources, a documented schema, a loader you can rerun, twenty saved queries, and three monthly refreshes. This is your most private data, so keep the file encrypted or on a drive you control, and never post a screenshot with raw rows in it.

At a glance

Per requirement
50 XP
Completion bonus
600 XP
Requirements
7
Takes
A season
Skill level
Intermediate (months of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own
Locked for now
Earn two more Rare badges in SQL & Databases to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Export at least four sources about yourself and write down the format, size and date range of each. A bank CSV, a phone health export, a calendar ICS converted to CSV, streaming history JSON, location history, or email metadata all count. Most have an export button buried in the settings, and some take a week to arrive, so start them all on day one. Take a screenshot of the inventory table, with no raw data in it. Photo
  2. 2
    Design a schema with one table per source, one date format everywhere, and a diagram of how they relate. Use ISO dates in every table without exception. Make a days table with one row per date that everything else joins to, because that's the trick that makes cross-source questions easy, and the recursive CTE from Window Seat builds it. Take a photo of the diagram. Photo
  3. 3
    Write a loader that rebuilds every table from the exports folder in one run, and logs the rows loaded and rejected. A .sql file of .import and INSERT ... SELECT statements, a DuckDB script, or a short Python script, whichever you'll still understand in three months. The JSON Unpacked badge is the pattern for the JSON sources. Run it twice from an empty database and get identical counts both times. Take a screenshot of the loader and the log of a clean run. Photo
  4. 4
    Write twenty saved queries that each answer a question you actually had, with a comment above each one. At least ten should join two or more sources, like 'spending on days with under six hours of sleep versus over seven' or 'months ranked by calendar hours and by music hours'. Take a screenshot of the query file, with the results hidden or summarized. Photo
  5. 5
    Build a monthly summary view across every source, with no personal detail finer than monthly. Make a monthly rollup view that joins all the sources through the days table, then post its rows as they are or chart them in anything. Monthly totals are safe to post, and rows from the source tables are not. Take a screenshot of the monthly view or the chart made from it. Photo
  6. 6
    Refresh with new exports at the end of each of three months using the loader, and record what broke. Export formats change, a column gets renamed, a date format shifts, a file arrives zipped this time. Each refresh is a row in the log with what broke and the fix. Take a screenshot of the log after three refreshes. Photo
  7. 7
    Write 500 words on the one question only this database could answer, and what it said. Post the text with a screenshot of the monthly view it came from. Leave out the raw data and any screenshots of rows, and post just the finding. Photo