A consumer-packaged-goods data story — 5,014,409 catalog rows modelled on
Libstar's public brand portfolio, cleaned by Azure Data Factory, served by Synapse serverless SQL,
scored with machine learning, and reconciled to the rand across Qlik Sense, Excel and this page.
Case-study note: Libstar is a real JSE-listed CPG group, but every record here is
synthetic — generated (seeded, reproducible) on Libstar's public brand/category model to
demonstrate the pipeline without using any private data. Not affiliated with Libstar Holdings.
0raw rows generated (incl. planted duplicates)
0clean unique products after ADF
0rows quarantined — each with a reason
R1.17tntrailing 12-month revenue (synthetic)
0.71price-model R² · MAE R12.71
1 · More than a product list
CPG catalogs rot quietly. Prices arrive as "R 1,234.56" from one system and
"ZAR1234" from another; weights get captured in grams instead of kilograms; brands are
typed by hand; category codes from a previous org structure ("Groceries", "Snacks and confectionery")
linger years after a restructure. None of it looks urgent — until mispriced SKUs erode margin,
duplicate listings distort demand forecasts, and rollup reporting breaks exactly when a range review
needs it.
This project demonstrates the governed fix: a pipeline that quantifies the mess instead of
silently filtering it, resolves it with auditable rules, and publishes one set of numbers that every
downstream consumer — the live Qlik Sense app, the Excel pack, the ML models, this page — reconciles
to exactly.
Figure 1 — 5,014,409 deduplicated rows in, 4,284,971 unique clean
products out. Dates and prices are the biggest offenders.
3 · What the shelf looks like
Libstar's simplified operating model has two product groups. Ambient categories carry
77% of revenue (R904.1bn of R1,170.3bn), led by Spreads, Meal ingredients and Wet
condiments; perishables — dairy, convenience meals, value-added meats, baby, fresh mushrooms — hold
the rest. Margins cluster tightly around the 35% portfolio average, so revenue
mix, not margin spread, is what moves the total.
Figure 2 — Revenue by category, coloured by product group.Figure 3 — Margin by category vs the portfolio average.
Category scorecard (full population)
Category
Group
SKUs
Revenue 12m
Avg margin
Avg price
Spreads
Ambient products
526,813
R160,395,514,140
35.0%
R87.63
Meal ingredients
Ambient products
554,781
R155,347,925,715
35.0%
R74.20
Wet condiments
Ambient products
580,617
R154,977,096,220
35.0%
R68.20
Beverages
Ambient products
428,482
R135,697,476,592
35.0%
R94.98
Dry condiments
Ambient products
452,143
R122,903,791,560
35.0%
R69.79
Baking
Ambient products
427,832
R94,861,638,385
35.0%
R46.87
Convenience Meals
Perishable products
295,388
R85,861,274,105
35.0%
R79.71
Snacking
Ambient products
311,271
R79,899,697,159
35.0%
R62.37
Value-added Meats
Perishable products
176,523
R57,959,630,790
35.0%
R102.24
Dairy
Perishable products
194,459
R48,642,328,237
35.0%
R59.31
Baby
Perishable products
168,555
R39,589,869,572
35.0%
R52.17
Fresh Mushrooms
Perishable products
168,107
R34,146,064,405
35.0%
R39.17
Figure 4 — Product-group split and the four routes to market.
4 · Brand power: three ways to win
Three brand solutions compete on the same shelf: Libstar's own brands (Lancewood, Denny Mushrooms,
Cape Herb & Spice…), Principal brands represented in South Africa (Bonne Maman, Kikkoman, Tabasco,
Maille), and private label for retailers. Principal brands price ~35% above comparable own-brand
products; private label sits ~20% below — yet "Retailer Brands" is the single biggest revenue
line (R103.7bn) because it spans all twelve categories.
Figure 5 — Top 15 brands by revenue, coloured by brand solution.
Top 10 brands
Brand
Brand solution
SKUs
Revenue 12m
Avg margin
Retailer Brands
Private label and dealer-own brands
430,236
R103,650,387,104
35.0%
Finlar Fine Foods
Libstar Brands
268,984
R84,928,535,830
35.0%
Rialto
Libstar Brands
269,175
R81,006,558,210
35.0%
Khoisan Gourmet
Libstar Brands
267,412
R79,563,401,192
35.0%
Goldcrest
Libstar Brands
268,612
R77,820,300,503
35.0%
Cape Foods
Libstar Brands
268,381
R74,364,367,070
35.0%
Dickon Hall Foods
Libstar Brands
269,141
R73,699,851,203
35.0%
Chamonix
Libstar Brands
269,004
R73,286,135,131
35.0%
Montagu Foods
Libstar Brands
269,449
R72,784,041,446
35.0%
Cape Coastal Honey
Libstar Brands
134,815
R40,291,885,412
35.0%
5 · Where South Africa buys
Hover (or tap) a province. Gauteng leads (R343.8bn),
then Western Cape and KwaZulu-Natal — sales concentrate in the five provinces where the business has
production or distribution footprints.
R34.4bnR343.8bn
Hover a province
12-month revenue—
Products stocked—
Average margin—
Routes to market
Retail and wholesale
R711.0bn
Food service
R206.6bn
Industrial and contract manufacturing
R137.5bn
Export
R91.8bn
6 · Data quality — where the numbers leak
The Data Factory flow rejected 729,438 rows
(14.5%) — and can say exactly why, row by row. Because reject
reasons ship into the same reporting layer as the clean data, data quality becomes a trend a team can
manage down, not an invisible loss.
Reconciliation guarantee: the Qlik app, the Excel report, the ebook and this
page all read the same aggregate layer. Revenue is R1,170,282,306,879 in all four — to the rand.
7 · Machine learning: pricing & anomalies
Pricing has learnable structure. A gradient-boosted model predicts shelf price from category,
brand solution, channel, weight and rating with R² = 0.71 and a mean absolute error
of R12.71 on a mean price of R71.69 — evidence that pricing
follows the portfolio's architecture, exactly what a well-governed catalog should show.
Figure 6 — IsolationForest anomalies vs the normal price–margin cloud.Figure 7 — Four KMeans segments: volume movers, premium niche, two mainstream clusters.
Why items get flagged, in plain language: the model scored one million
products on price, cost, margin and weight together, and flagged the
2,000 whose combination is most unlike the rest — a heavyweight item priced
like a small pack, an implausible margin, a luxury-priced commodity. These usually signal data-entry
or pricing errors, not genuine premium products. Recommendation: route this list to category
managers before the next price-list publication — correcting them before they reach shelves protects
margin and avoids customer-facing pricing errors.
Top 10 to investigate first
Product
Category
Brand
Price
Cost
Margin
Score
Classic Beef Burger Patties 250ml
Value-added Meats
Finlar Fine Foods
R227.69
R181.82
20.1%
-0.0801
Premium Orange Marmalade 750g
Spreads
Bonne Maman
R260.87
R208.63
20.0%
-0.0791
Everyday Hot Chocolate 250ml
Beverages
Rialto
R315.01
R169.81
46.1%
-0.0760
Classic Strawberry Preserve 2kg
Spreads
Dickon Hall Foods
R193.94
R154.88
20.1%
-0.0749
Select Chicken Nuggets 250g
Value-added Meats
Finlar Fine Foods
R210.95
R168.58
20.1%
-0.0749
Everyday Chicken Nuggets 500ml
Value-added Meats
Finlar Fine Foods
R224.52
R179.44
20.1%
-0.0749
Traditional Mac & Cheese Meal 1kg
Convenience Meals
Millennium Foods
R219.97
R174.70
20.6%
-0.0748
Classic Instant Cappuccino 250ml
Beverages
Chamonix
R281.27
R155.00
44.9%
-0.0739
Organic Green Tea 500ml
Beverages
Chamonix
R203.88
R162.23
20.4%
-0.0732
Gourmet Apricot Jam 2kg
Spreads
Cape Coastal Honey
R236.00
R186.40
21.0%
-0.0724
8 · Azure in production
Everything runs on a free-trial credit by design — no always-on compute anywhere in the chain.
Resource
Purpose
Idle cost
stpargoparcels01
ADLS Gen2 — raw / curated zones
≈ $0.03/month
adf-pargoparcels-za
Data Factory — cleaning data flow
$0 (per-run billing)
syn-pargoparcels
Synapse serverless SQL endpoint
$0 ($5/TB scanned)
pargo-trial-budget
$200 budget · email alerts at 50/75/90%
free
Kill-switch once all consumers are loaded: az group delete --name rg-pargoparcels --yes.
The Qlik app (data loads in-app), the 36 MB .qvf export, the Excel pack, the ebook and this page all
keep working after teardown.