Skip to content

Customer-month features from a card ledger.

This pipeline builds monthly customer features from a synthetic South African card ledger. It tracks spend mix, recurring debit orders and subscriptions, income stability, balance-stress flags, and a simple churn-risk label.

A local Spark job writes partitioned Parquet and the snapshot this page reads. The ledger is generated. It is not bank or client data.

Specimen, not client data.

Code available on request. Write to hello@cipherlabs.cc.

Latest feature month

Specimen, not client data. ZAR, 2025-03, 6 months in the run.

2 500

Customers

150 000

Transactions

9.3%

High churn-risk

Clear

Quality gates

Segment spend mix

Outgoing amount by customer segment and MCC group, latest feature month. Income credits are excluded.

Spend by segment and category

ZAR

Outgoing spend by customer segment and MCC category
SegmentCategorySpendShare
AffluentInsuranceZAR 279 13012.8%
AffluentUtilitiesZAR 271 19212.4%
AffluentDigital servicesZAR 236 44410.8%
AffluentRetailZAR 224 64510.3%
AffluentGroceriesZAR 210 7379.6%
AffluentFuelZAR 207 0839.5%
AffluentRecreationZAR 204 8959.4%
AffluentTransportZAR 193 7408.9%
AffluentDiningZAR 175 0698.0%
AffluentHealthZAR 155 1177.1%
AffluentTelecomsZAR 29 3881.3%
EstablishedUtilitiesZAR 838 98412.8%
EstablishedInsuranceZAR 828 90912.7%
EstablishedDigital servicesZAR 697 03310.7%
EstablishedDiningZAR 637 0629.7%
EstablishedHealthZAR 613 0059.4%
EstablishedRetailZAR 596 4659.1%
EstablishedRecreationZAR 595 7019.1%
EstablishedGroceriesZAR 555 5948.5%
EstablishedFuelZAR 553 5518.5%
EstablishedTransportZAR 541 7588.3%
EstablishedTelecomsZAR 88 2691.4%
EverydayUtilitiesZAR 1 669 44212.7%
EverydayInsuranceZAR 1 646 04812.5%
EverydayDigital servicesZAR 1 315 36210.0%
EverydayHealthZAR 1 239 2789.4%
EverydayGroceriesZAR 1 238 9869.4%
EverydayRetailZAR 1 218 4479.3%
EverydayTransportZAR 1 210 1019.2%
EverydayFuelZAR 1 177 6378.9%
EverydayDiningZAR 1 171 1428.9%
EverydayRecreationZAR 1 100 6178.4%
EverydayTelecomsZAR 179 3871.4%
Specimen, not client data. Latest month 2025-03.

Recurring payments

Same customer, merchant and type in two or more months, amount within 5 percent of the series median.

Detected series

ZAR

Recurring payment series by kind
KindSeriesMedian total
card purchase1 136ZAR 1 772 676
debit order5 000ZAR 5 533 703
subscription5 000ZAR 594 468
Specimen, not client data.

Churn-risk

Latest month only. High: missed salary, or overspend with a negative balance. Medium: unstable income or spend near income. The rest are low.

Customers by label

  • low2 174 · 87.0%
  • medium93 · 3.7%
  • high233 · 9.3%
Specimen, not client data. Ochre is high risk.

Pipeline run

Row counts after generate and feature build, then the checks that ran between those stages.

Row counts

Pipeline table row counts
TableRows
customers2 500
merchants360
categories12
transactions150 000
customer month features15 000
Specimen, not client data.

Quality checks

Bronze and gold quality checks
StageCheckStatusDetail
bronzeunique customer idpass2500 distinct / 2500 rows
bronzeunique merchant idpass360 distinct / 360 rows
bronzeunique transaction idpass150000 distinct / 150000 rows
bronzetransaction keys presentpass0 transactions missing keys
bronzecurrency zarpass0 rows not in ZAR
bronzesalary credits positivepass0 salary rows with non-positive signed amount
bronzespend debits negativepass0 spend rows with non-negative signed amount
bronzetransaction customer fkpass0 transactions with unknown customer_id
bronzetransaction merchant fkpass0 transactions with unknown merchant_id
goldunique customer monthpass15000 distinct / 15000 rows
goldfeature keys presentpass0 feature rows missing keys
goldchurn label domainpass0 rows with an unknown churn_risk label
goldnon negative moneypass0 rows with negative salary or spend
Specimen, not client data.

If your numbers do not add up, a report is still built by hand, or your team has outgrown its tools, get in touch.

A few sentences on the situation are enough. We reply from the same address you see here.