Inteli Logo

Module 8 · Information Systems · Lesson 6 · Lab

Dimensional modelling in the browser

DuckDB runs inside this page. Every date is Unix time, in seconds. The table db_ingestion holds what was captured from TCGplayer about the Pokémon TCG sets of 2026 and is kept in the localStorage of the browser, together with every statement that created an object, so the model survives a reload. Each step has a CREATE prompt for the coding agent and the reference SQL of the professor.

DuckDB: loading db_ingestion: waiting model: waiting
Step 01 · 10 min

Dimensions

Set, product, variant and date, as views over the JSON of db_ingestion.

Step 02 · 6 min

Fact

The periodic snapshot of prices, as a view, and the test of the grain.

Step 03 · 10 min

Cube and mart

CUBE of set, rarity and variant on every date, and the mart of the collectors, all views.

Step 04 · 7 min

Frozen and live reports

September materialized in a table, the last capture in a view, and a new capture that only the view sees.

Step 05 · 7 min

Five questions

Roll-up, slice, pivot, dice and the cards that appreciated most.

Second hour · groups

Your data in ClickHouse

The same steps over the partner data, in lab.gNN_ on shrek2.

Ctrl+Enter runs every statement · results appear below

Drill-down explorer

The chart reads the materialized report of September or the live report, and groups it by the dimensions checked below. Checking a dimension drills down, unchecking it rolls up, and clicking a bar descends into that member along set › rarity › card. Every view is one cell level of the cube; the side panel shows the SQL and the matching cells of gold.agg_price_cube.

Dimensions

SQL of this view

Same level of the cube

Prompt