Tutorial notebooks
Five hands-on tutorials, each a Jupyter notebook in the repo under
examples/.
The pages here are rendered from the notebooks’ committed, executed
outputs — what you see is what ran against a real PostgreSQL. Follow them
in order:
| # | Tutorial | Difficulty | Scenario |
|---|---|---|---|
| 1 | Basic aggregations | Beginner | E-commerce: Customers → Orders |
| 2 | Temporal joins | Intermediate | Healthcare: Patients → Care plans |
| 3 | Deep nesting | Intermediate | Retail supply chain, depth 3 |
| 4 | Custom primitives | Advanced | Financial analytics: Accounts → Transactions |
| 5 | Categoricals, output & imputation | Advanced | Food inspections: Facilities → Inspections |
What each one teaches
- Basic aggregations — parent-child aggregations (
count,sum,mean,min,max,stddev,nunique), time windows (P7D,P30D), feature naming. Start here (it is the notebook form of the walkthrough). - Temporal joins — as-of join semantics, grace periods, point-in-time
generation, the
LEFT JOIN LATERALSQL, and rolling stats. - Deep nesting — multi-level relationships (
max_depth: 3), feature propagation across chains, and how the CTE structure grows. - Custom primitives — writing and registering your own aggregations
(
range,p95) and transformations (log1p,zscore,bin), then selecting them inconfig.yaml. - Categoricals, output & imputation — fixed-vocabulary one-hot encoding
(
role: categorical/role: identifier), the feature manifest, output formats (to_dataframe/to_arrow), and the imputation contract. Unlike 1–4, this one executes against PostgreSQL throughout.
To run them yourself:
git clone https://github.com/ccd-ia/featurizer.git && cd featurizeruv sync && just db-upuv run jupyter lab examples/