Contact us
Insights

Testing late-arriving dimensions

A sale can arrive before the customer or product it refers to. How to handle it so facts aren’t lost or reported against the wrong item.

The problem

Facts that arrive before their reference data

In a reporting warehouse, transactions such as sales are linked to reference data such as customers and products. Usually the product exists before it’s sold. But if a new product is sold in store before the product feed has delivered it, the load can’t find a match. A poorly built load either drops the sale or links it to an “unknown” product for good. Either way, sales by product are wrong and nobody is told.

Options

Ways to handle a late-arriving dimension

Placeholder row

Create a product with just its code, link the sale to it, and fill in the details when the real record arrives.

Hold and retry

Park the sale and retry the match on the next run, for data that usually arrives within hours.

Unknown member

Link to a single “unknown” row only when the reference genuinely doesn’t exist, and report every use of it.

Testing

Test cases worth automating

Step 1 of 4

  1. Load a sale for a product that doesn’t exist yet. The sale must load, linked to a placeholder.

  2. Load the product. The placeholder must be filled in, not duplicated, and the sale stays linked.

  3. After an agreed time, the placeholder must appear on an exceptions report.

  4. Change the product’s category. History must follow your agreed rule for changes.

Report placeholders that never fill

A placeholder is a promise that the details will follow. Keep a daily list of placeholders older than an agreed age, such as three days, with the sales linked to each. For example: a product code typed wrongly at the till will never receive real details, and the list is how someone finds and corrects it.

Sales reported against “unknown”?

Tell us which reports are affected and where the data comes from. A few lines are enough.

Tell us what’s not working