Build the waste bank’s warehouse with real DuckDB: CSV, a star schema, SCD 2 and idempotent loads. 14 levels, right in the browser.
What the levels ask
Mrs. Sari typed Neighbourhood 01's weighing book on her phone and sent rt01.csv. The neighbourhood head wants to know how many kg of each kind Neighbourhood 01 brought this Saturday. Pick how DuckDB reads the file, then run the warehouse.
Mrs. Lastri saved Neighbourhood 02's book from Excel on her laptop, which is set to Indonesian: the separator is a semicolon and the weights use a decimal comma (1,5). DuckDB has loaded it into raw_rt02, but berat is still text. Pick how berat becomes a number so the board matches Mrs. Lastri's count.
Dina records Neighbourhood 03's deposits in an app, which sends rt03.jsonl: one JSON object per line. Last Thursday the app was updated, and since then the weight is sent as berat_gram. Pick what fills berat so the deposits before and after the update both count, in kilograms.
Mr. Dodi writes Neighbourhood 04's weights three ways: 1,5, 2 kg and 0.8. Saturday's cleaning rule only understands plain numbers. On Monday Ms. Laksmi fixes it, but Mr. Dodi has taken his book home. Pick how the book is loaded on Saturday so that Monday's report is complete.
The neighbourhood head wants the kg and rupiah of each neighbourhood for Saturday 10 October. The fact table records who brought which kind, with its code and with the courier's own writing; the neighbourhood is in dim_nasabah and the price in dim_jenis. Pick the key of each join.
September is closed. Mr. Bayu wants, for each kind: how many kg came in from the villagers, how many kg were sold to the collector, and the money. Deposits are recorded per weighing, sales per truckload. Pick the grain of the two CTEs before they are joined.
The first quarter's report is printed and pinned up in the hall. On 1 April Grandma Marni moves into her son's house in Neighbourhood 04. Record the move and pick the join condition, so the first quarter's numbers do not change and the second quarter counts Grandma Marni in Neighbourhood 04.
On Saturday noon the laptop froze while loading Neighbourhood 05, and Ms. Laksmi pressed Run once more. Pick how Neighbourhood 05 is loaded so that running it twice gives the same as running it once, without disturbing Neighbourhood 01, loaded this morning.
This week Neighbourhood 04's deliveries came every day, and some have problems. Switch on the checks that hold back the bad deliveries at the gate without holding back the good ones. A delivery that passes every check goes into the facts.
The deposits fact is not rebuilt every night: only new rows from the landing table are added. On Tuesday night, Mr. Dodi's Saturday book finally arrives. Pick the filter for new rows so every deposit enters the facts exactly once.
The members' app sends a change log: each line an insert (I), an update (U) or a delete (D), with an lsn number in order. Build today's dim_nasabah, then count the members of each neighbourhood.
Mrs. Sari wants her savings book: every deposit and withdrawal, with the balance after it. Pick the saldo expression for every member's book, so Mrs. Sari's matches her notebook.