S1 · Episode 08

Metrics, Feature Stores, and Sending Data Back

Runtime 13:42 AI-narrated

About this episode

Gold is not a mythic city. It is tables humans can think with, and anywhere a decision happens with a clean name.

Eve and Surya draw a star schema without a whiteboard: tickets in the middle, customer, product, and date around them. When a customer moves cities, the trade calls that a slowly changing dimension. Finance, marketing, and the chief executive do not match because revenue is three different SQL queries; a metrics layer writes the formula once. Reverse ETL pushes gold back into Salesforce or the ward chart, with the same masking as any exit door. The feature-store Tuesday: swipes in the last five minutes must be the same number at 3 a.m. training and at the card terminal.

A star drawn from a stack of tickets

Eve opens by asking what the gold layer really contains, since Surya keeps naming it as if it were a legend. His answer is plain: tables a person can reason about, the plated dish at the pass rather than the swamp or the legal archive.

Eve wants the star schema without a whiteboard. Surya uses the tickets a kitchen tears off. Each ticket line is one fact-table row holding the numbers: quantity, price, discount. Around the pile sit three small books for the customer, the product and the date. He walks one ticket, table twelve, a Tuesday, one pasta, into the customer book (Maya, Boston), the product book and the date book: three short hops instead of a hunt through delivery notes.

Teams sometimes flatten to one wide sheet later, but the star mirrors how people already think about a sale. The shape is Kimball's; the name mainly shortens meetings. dbt lives here, ordinary SQL selects, tested and reviewed. The date book is a genuine table, built once so no cook invents a private calendar. The star sits in the warehouse: Redshift, BigQuery, Synapse and now Fabric, Snowflake on any of the three. The shape ignores the logo.

When the customer moves from Boston to Denver

Eve moves Maya to Denver. Surya says the first problem is a question, not a technical one: does the report need the city at the time of the order, or only the city this morning? For revenue by city Eve wants the former, so overwriting Boston with Denver, what the trade calls type one, would make last year's dinners appear to have happened in Denver.

Type two adds a row with valid-from, valid-to and an is-current flag. The Boston row closes on moving day and Denver opens, so old tickets still point at Boston. This is the slowly changing dimension: customers do change, just not weekly, and the report must recall what held when the ticket was torn. dbt snapshots handle it quietly. If marketing only wants today's city, type one is honest, or a current-city column is published from type two. More types exist, but on an ordinary day type one is a correction and type two is history.

Vault underneath, and one formula for revenue

Eve has heard that banks avoid stars. Surya describes a highly normalized warehouse, many small tables, hard for a human to question, and Data Vault, with hubs, links and satellites, insert-only and auditable, so a regulator asking what was known on a given date finds the paper still in the drawer. A filing cabinet, not a plate; a star still goes on top for the humans.

Then the meeting where finance, marketing and the chief executive bring different revenue printouts. Surya's diagnosis: revenue is three SQL queries, one subtracting refunds, one not, one counting only shipments. The remedy is a metrics layer, the formula in code once with grain, filters and allowed dimensions, every tool asking by name, lineage included.

Surya: “If two numbers disagree, you have a bug, not a calendar invite.”

Grain is what one row means: a ticket line, an order, a day. The metric file needs a named owner; a platform team can own pipes but not the meaning of revenue, which is a business sentence dressed as SQL.

Sending gold back through an exit door

Eve assumed pipelines end at Tableau. Surya says that is how data teams stay decorative. Reverse ETL pushes gold into the tool where somebody acts: a churn score synced into Salesforce so a rep sees trouble before dialing; a usage segment pushed to the ad platform; a hospital readmission risk written into the chart so a ward coordinator sees it mid-shift. Hightouch and Census get mentioned, though he will not guess which logo you run; the pattern is a scheduled push from a gold table to an API.

It is an exit door, with the same masking and review as any other. Personal data is not innocent because it is bound for Salesforce, and a medical logo on the ward chart does not waive the mask.

One recipe on two shelves

Eve admits feature stores make her glaze over. Surya offers three in the morning: someone training a fraud model on features such as swipes in the last five minutes for a card. Eve calls it a mere count. He agrees, but it must be the identical count at training and at the card terminal that afternoon. When they diverge, different windows or rounding, that is train-serve skew: brilliant in the lab, useless at the door. The second lie is leakage, joining in Thursday's chargeback or a later fraud flag, so the model reads the end of the book.

Surya: “The store is not a fancy database. It's the agreement that there is one ladle.”

Point in time means training uses only what was knowable at the swipe. Hence two shelves under one definition: slow history in the lake or warehouse for training, a fast lookup for the terminal, both filled by one transformation. Every cloud's ML suite sells one, Feast is open source, and Surya picks no church. Gold, he closes, is wherever a decision happens under a clean name, on a dashboard, an API, a model, a sales screen or a ward chart. Two kitchens are the bug; a single recipe is the job.

Figure: gold and where it goes — the star schema (tickets with customer, product, date), the metrics layer that writes the revenue formula once, reverse ETL back into Salesforce or the ward chart with the same masking, and the feature store serving training and the card terminal from one ladle.

Takeaway

Takeaway: if it is not named, it is not gold. It is leftover soup.