At the morning production meeting, the manager opens yesterday’s waste report. The plant recorded 100 kg. Later that morning someone corrects a weighing record, the pipeline runs again, and the report still says 100 kg. Should the manager keep using that number?
I used this example in one of my latest conference talks about treating a data platform as a product. It grew out of a waste analysis project where we replaced a data agent with five agreed KPIs. In this article, we’ll follow the daily waste mass all the way to the report the manager opens in the morning.

What does the team promise to publish?
The report covers plant PL01 on 24 November. One line recorded 40 kg of waste, another recorded 60 kg. At 06:42 the next morning, the team published the sum. The dashboard reads that published total. Technically speaking, dashboard developers can sum the source records directly but there is a very good reason to use the published result. Otherwise, if a correction arrives, they will have to decide by themselves which version of each record to include and whether the replacement is ready to use.
The sum in this case is a data product defined by a data contract. The contract is the agreement between the team publishing that result and the people or applications relying on it. The manager and the report developer can review the terms together on one card.
| What the manager or report author needs to know | Agreement for the daily waste report, v1 |
|---|---|
| Where do I read yesterday’s figure? | Read the current result from curated.waste_daily_plant. One row represents one plant on one business day, keyed by plant_id and business_date. |
| What goes into the total? | Take the current version of each waste record, convert its mass to kilograms and sum it. Assign the day from the time of weighing in the plant’s time zone. |
| When can I use it? | Publish by 07:00 the following morning, in plant time. Show the business date, publication time, revision and current status. |
| What does approved mean? | The source delivery is complete, the records have usable units and mappings, and the counts and mass reconcile. |
| What if a check fails? | Keep the last approved revision for that plant and day and mark it as being corrected. If none exists, show no approved data. |
| Who handles questions and changes? | Production owns the KPI definition. The data product owner handles publication and incidents, with an on-call backup. Agree changes to the key, grain, unit or meaning with the report owner before rollout. |
Take the date rule as another example. A line weighs waste at 23:55 on 24 November and the record arrives at 00:10 on the 25th. Both clocks are showing plant time. If an engineer groups by arrival date, the weekly total looks right, but for daily reports the manager will see too little waste for 24 November and too much for the 25th. That little line on the card tells the engineer which clock to use, including when rebuilding an old report.
The report’s agreed “place” to read is the publication boundary. Behind it the team might combine two jobs or change where it stores cleaned records. A medallion architecture gives the team places to do that work. The contract tells the dashboard developer which result has passed the checks. If several tools need to read the same agreement, the Open Data Contract Standard gives the team a way to record its schema, quality rules, service levels and ownership in version control.

What would stop the team from publishing?
Suppose the 40 kg weighing came from line L3. The table that maps lines to plants keeps two versions of the L3 entry. An attribute changed in July. Both versions correctly say that L3 belongs to PL01, and only the newer one applies in November.
Join the waste record to that table on line ID alone and the 40 kg matches twice. The second line’s 60 kg matches once. Group the three matches by plant and day and the report now says 140 kg. The uniqueness test passes because the grouping produces one row for PL01 on 24 November.
A very simple check to do here would be to count how many matches each weighing has before adding up the mass. For each record, its event time must fall in exactly one mapping’s validity period. A gap leaves the record unassigned. Overlapping periods can count it twice. Technically its an implementation of Slowly Changing Dimensions (SCD) type 2. You can find more information in Microsoft’s explanation of historical dimension lookups which describes the same problem when a salesperson changes region.
For this report, three checks belong in the publication job. First, the source sends an end-of-day marker that confirms it has finished delivering the agreed batch for the plant. Before that signal, two perfectly valid records might just be the first two to arrive. Next, the job checks the expected fields, converts known units and checks the mapping for every current record. Finally, it accounts for every current input as accepted or rejected and reconciles the candidate total against the accepted masses before the join. That’s where 40 + 60 has to agree with the number headed for the report. An unresolved rejection affecting mass holds up publication for that plant and day.
What does the manager see while someone fixes the record?
The approved 40 kg came from record E17, version 1. At 09:14 the source delivers version 2. Someone has changed the quantity to 45 and left the unit blank. The engineer can see what looks like a five-kilogram adjustment. Would you put your name to that conversion?
The job keeps E17 version 2 and records the reason it rejected it. Other plants can carry on publishing. The product owner tells the manager that the 100 kg shown for PL01 is the last approved total and that a correction is in progress. The source team gets the record ID, version and missing field so it can repair the entry. Production only needs to get involved if there’s a question about what the KPI should include.

Now imagine the same missing unit turns up on the very first delivery. There are no approved 100 kg to keep on screen. There are several ways to handle this case. My preference would be to show the plant and date with no approved data and leave the value empty. Carrying forward yesterday’s number would quietly change the day the manager is discussing. Showing zero would tell the meeting that the plant produced no waste. Both are quite specific claims to make about a weighing nobody can interpret yet.
Another report might let a supervisor work with a partial total and a list of missing records. That’s a conversation worth having with the person who uses the data. For this morning meeting the manager we were talking about wants a figure they can quote for the whole plant. That choice explains why a single missing unit holds it up.
How do 105 kg reach the report?
The source team supplies E17 version 3. This time the record says 45 kg. The publishing job reopens PL01 for 24 November and reads the retained inputs for that plant and day. It selects E17 version 3 and the unchanged E18 version 1. Together they make 105 kg. Adding 45 kg to the published total would count the original weighing again. Replacing the whole total with 45 kg would lose the second line.
This is why its important to decide how long the source history needs to be kept when agreeing how far back the team accepts corrections. To replay a day, the job needs the relevant input versions, the line mappings in effect at the time and the calculation rules. If a correction moves a weighing across midnight, two days need recalculating. Otherwise one day gains the mass and the other keeps it too.
After the checks pass, the team publishes 105 kg, revision 2 and approved together as a single entry. One implementation keeps those fields in the same row and changes them in one transaction. With a table format such as Delta Lake, a reader using its transactional read path sees a consistent table snapshot. The dashboard can refresh from that publication. Anyone looking at a cached copy can use the revision and publication time to identify what they’re seeing.
What if the write succeeds and the job times out waiting for confirmation? We could give the publication an identifier derived from the plant and day, the selected input versions and the version of the rules, including the mappings. A single publisher for that key can look for the identifier on retry. If revision 2 already carries it, the work is done. Teams allowing concurrent publishers also need to enforce that decision at write time. Two jobs can both check for an identifier before either writes it.
What changes when someone asks for the figures by line?
The 100 and 105 kg totals answer the same question. They are two revisions under contract v1. If an analyst asks for daily waste by production line, the dashboard developer needs a row for each line. That changes the grain, or what one row represents.

Suppose the dashboard joins the waste figure to a target set once per plant and day. If we replace one plant row with two line rows, each line picks up the entire plant target. Sum the joined rows and the target doubles. The waste total comes out to the correct 105 kg either way. I’d give line-level analysis its own read point and contract. The manager can keep using the plant report while the analyst checks that the lines roll up correctly. Before migrating the dashboard, I would check both the total mass and the plant target against the figures on the old report.
What can an AI agent say about that number?
Give an agent the report while the correction is open and ask for yesterday’s waste. With access to the published row, it can tell the manager that 100 kg was the last approved figure for PL01 on 24 November and the source team is checking a correction. Give it just the numeric column and it loses the distinction the dashboard took such care to show. The tool should return the plant, day, unit, revision and status with the value, under the caller’s permissions.
If I were reviewing a data contract with a team, I would open the report before opening the contract file. Then we could put the 100 kg back on screen and ask: what should the manager see tomorrow morning if the correction still has no unit?
FAQ
What is a data contract?
A data contract is an agreement between the team publishing data and the people or applications using it. It defines what the published data means, where and when to read it, who supports it and what consumers can expect when delivery goes wrong.
Does a data contract need a specific file format?
The production manager can review a short contract card. Teams that want to version the agreement and use it in tooling can also express it in the Open Data Contract Standard. The publishing job runs those checks before it releases a result.
What should a report display when a correction fails?
For the waste report, show the last approved value for that plant and day, its revision and a correction notice. If the first publication failed, show that no approved result exists. A zero needs evidence of a complete day with no waste.
When does a change need a new contract version?
A correction under the same definition produces a new data revision. If a change would make an existing consumer interpret the data differently, agree a new contract or version and a migration. Changing from one row per plant to one per production line is one example.
Further reading
- Bitol: Open Data Contract Standard
- Microsoft Learn: Understand star schema and the importance for Power BI
- Delta Lake: Concurrency control