Analytics workloads / LESSON 14

Analytical grain, timing and platform evidence · Azure Data Fundamentals

24 min + practice · Original foundation lesson

Test output grain, event clocks and shared platform capabilities with explicit counterexamples.

Start with what one output row means

An analytical answer needs a measure, population and grouping grain. A number can be calculated correctly yet answer the wrong business question. If a report requests delivered Units by Month and Area, the measure is aggregated Units and one output row represents one Month/Area pair. Counting source records substitutes another measure; grouping only by Area merges periods. Name all three parts before choosing a query or visual. A semantic model is the underlying data organization for reporting, not evidence that every relationship and calculation in that model is already correct. The reader should be able to reconstruct which source records contributed to one displayed value.

Worked example: a correct join can duplicate a measure

A fictional Orders table contains (O1,10),(O2,15),(O3,15), where the number is the order amount. Lines contains two records for O1 and one each for O2 and O3. An equality join creates amounts 10,10,15,15 and their sum is 50. The business asks for each order amount once, so the correct order-grain sum is 10+15+15=40. SUM(DISTINCT Amount) would instead return 25 because it also removes one of the two distinct orders with amount 15. A global divisor is no general repair when line counts vary. Preserve order identity and calculate at the intended grain; do not choose an attractive numeral without a rule that survives this counterexample.

Separate event membership from arrival availability

A stream can carry an event timestamp and an arrival timestamp. In a supplied teaching rule, a window groups event times from 09:00 inclusive to 09:05 exclusive, permits late events until 09:10, and recomputes at 09:08. An event occurring at 09:04 and arriving at 09:07 is available and belongs to that window. An event occurring at 09:06 does not enter it merely by arriving before the cutoff. These are deliberately explicit exercise conditions, not a claim about a cloud default. A production design would also need a policy for later arrivals, revisions, duplicates and failed processing. The conceptual pattern alone does not promise zero latency or exactly-once results.

Avoid false exclusivity and performance promises

Azure Databricks and Microsoft Fabric have overlapping Spark and notebook capabilities in the retained official references. A request saying only Spark and notebooks therefore does not uniquely select one. Compare the required integrations, governance, operations and actual service contracts before deciding. The same discipline applies to formats: a columnar Parquet layout is relevant to selecting columns for a scan, but it does not benchmark every query or point update. Shared capabilities are not proof of complete platform equivalence, and a layout characteristic is not a universal speed guarantee. State the candidate discriminator and the evidence that would make another candidate fail it.

Transfer check: split two output contracts

Try this fictional review. A team needs a midday running count and a reproducible final-day report. It retains raw arrivals but has no aggregation consumer, and it calls the first running result final. Identify two missing requirements before checking the answer. First, arrivals must be processed into the requested running aggregate and published; a buffer or archive alone does not compute it. Second, define the bounded retained input set and the calculation for the daily rerun. The daily set may differ from the inputs visible midday. A changed condition in which both outputs share code does not remove their different freshness and completeness contracts. Explain both boundaries in your own words, then attempt the linked formal tasks.

Try it, then explain it.

Complete a short set without looking at the example. After each answer, explain which evidence or rule supports your decision and why the alternatives do not fit.

Practice 7 questions