BEES Functional Trainings · Data & Analytics · Class 5 · Workshop 1

Inteli Executive Education · Global Product Scalability & Variability · 2 hours online

Global Product Telemetry Foundation

Data Engineering and Pipeline Automation for a product that runs in many markets. The session builds a canonical gold layer, a data contract and an orchestration design that let markets be compared at scale without erasing the differences that matter and without one pipeline per market.

Canonical metricsMedallion · gold layerData contractsOrchestrationAI-assisted mapping
Session objective and structure

By the end of the session, participants should be able to define canonical events and metrics with tenant, market, version, configuration and feature state dimensions, model the gold layer with conformed dimensions, specify a data contract and its orchestration, and validate AI-generated mappings by reconciliation.

1Opening and retrieval poll0–10 min
2Concept briefing10–40 min
3Worked example40–55 min
4Break and groups55–60 min
5Telemetry Harmonization Lab60–100 min
6Debrief100–115 min
7Transfer and post-work115–120 min
The case uses Tradeline, a fictional B2B ordering marketplace that operates in Brazil, Mexico, Colombia, South Africa and the Dominican Republic. Every file of the lab is synthetic. The data engineering lifecycle is a prerequisite and is not reviewed in the briefing.
Opening: from recurrence signals to comparable metrics

The Kick Off showed that a local request becomes a candidate for the global core when the same need recurs across markets. Recurrence can only be observed when the markets measure the same thing in the same way.

Retrieval · Kick Off

Which recurrence signals did the Kick Off use?

Recall one signal that indicated a recurring need across markets and state which metric would have to be comparable between markets for that signal to be trusted.

Poll · answer by phone

Which metric is hardest to compare across markets today?

Completed orders, GMV, active retailers, conversion, delivery time or another one. Add in one line the reason: definition, time zone, currency, missing attribute or duplicated events.

Guiding question

How can we build a data, transformation and orchestration foundation that allows customers, tenants and markets to be compared at high scale, without erasing relevant differences and without creating customer-specific pipelines?

Artifact of the session

Canonical Metric Spec

Definition, grain, required dimensions, local extensions, expected quality, single point of calculation in the gold layer, orchestration dependencies and owner of one metric.

Transformation and orchestration at high scale

In ELT the raw data is loaded first and transformed inside the platform, which places the calculation of each metric in the transformation layer. With thousands of DAGs, the design questions move from how to transform to where each metric is calculated and who answers for it.

PropertyWhat it requiresWhat happens without it
IdempotencyRunning a task twice for the same partition produces the same table, typically by overwriting the partition instead of appendingRetries and reruns double count orders
Reprocessing and backfillA declared window for late events and a way to recompute past partitions without touching the restLate deliveries never reach the month in which they happened
Cross-domain dependenciesExplicit upstream tables owned by another domain, with an agreed freshnessA finance table silently reads a commerce table that changed its logic
Delivery deadlineA time by which the consumer needs the data and an alert when the critical path threatens itThe executive board opens with yesterday's numbers mixed with today's
Ownership and observabilityOne owner per output, with freshness, volume and failure history visible per DAGNobody can say which of two tables with the same name is correct

Reis & Housley (2022), Fundamentals of Data Engineering.

Medallion architecture and the gold layer

Each layer has a contract with its consumers. The gold layer is where business metrics are modelled, and its first design decision is the grain, the statement of what one row represents.

BronzeRaw, as received

Each market file lands as text, with source and load time. Nothing is corrected, so any later decision can be traced back and reprocessed.

SilverTyped, deduplicated, conformed

Local event names are mapped to canonical events, timestamps to UTC plus local business date, amounts to decimals in local currency, keys to global keys.

GoldBusiness metrics at a declared grain

One fact table per business process, for example one row per completed order, joined to conformed dimensions of market, tenant, retailer and date.

Grain first

Dimensional modelling starts by declaring the grain, then the dimensions that are true at that grain, then the measures. Mixing grains in one table is the usual origin of double counting.

Kimball & Ross (2013)

Metric calculated once

A metric used by several domains is calculated at one point of the gold layer and consumed from there. Recalculating it in each domain reproduces the divergence the gold layer was meant to remove.

Databricks (2025), medallion architecture
Conformed dimensions and a centralised gold layer

A conformed dimension has the same keys, attributes and meaning wherever it is used. It is what allows a measure from Brazil and a measure from South Africa to be placed in the same chart.

Conformed

Market, tenant, retailer, date

The date dimension carries both the UTC timestamp and the local business date of the market, because monthly reports are closed in local time.

Data mesh

Domains own their data products

Domain ownership, data as a product, self-serve platform and federated computational governance are the four principles described by Dehghani (2022).

Balance

Autonomy with a shared gold core

Domains keep autonomy over their silver data, while cross-domain metrics live in a centralised gold layer with one owner, which reduces redundant gold tables.

Federated governance defines global standards, such as the canonical list of events, the conformed keys and the lineage requirements, and leaves to each domain the decisions that only affect its own consumers.
Data contracts and schema evolution

A data contract is an agreement between the producer and the consumers of a dataset about its schema, its meaning, its quality and the rules by which it may change. It turns a silent upstream change into a negotiated one.

Part of the contractContent in a multi-market product
Common coreAttributes every market emits with the same name, type and meaning: event, order, timestamp in UTC, market, tenant, amount, currency
ExtensionsOptional, documented attributes of one market, such as a fiscal document identifier required by local regulation
QualityUniqueness after deduplication, ordering of lifecycle events, reconciliation tolerance
EvolutionWhich changes are compatible, which are breaking, notice period and coexistence of versions

Compatible

Adding an optional attribute or a new allowed value that consumers can ignore.

Breaking

Renaming or removing a core attribute, changing its type, or changing the meaning of an event that a metric depends on.

Jones (2023), Driving Data Quality with Data Contracts.

AI-assisted mapping, transformations and tests

An assistant can propose the mapping from a local schema to the canonical model, write the transformation and suggest quality tests in minutes. The proposal is a hypothesis about the data, and it becomes acceptable only after the aggregates reconcile.

1Describe

Give the assistant the canonical model, the local header and a sample of rows, never production personal data.

2Map

Ask for a column and event mapping with the reason for each line and the cases it could not decide.

3Generate

Ask for the silver transformation and for tests of uniqueness, nulls and event order.

4Reconcile

Compare counts and amounts by market and month with an independent source and explain every difference.

5Review

A person signs the mapping, records the assumptions and keeps the tests in the pipeline.

Typical errors of generated mappings are plausible event names mapped to the wrong lifecycle state, decimal and separator conventions ignored, and time zones assumed to be UTC. A reconciliation by market and month exposes the three. Huyen (2025) discusses the evaluation of AI outputs as part of engineering practice.
Multi-tenant product telemetry

For a configurable product, an event without the context in which it happened cannot be compared. Each event needs the attributes that say which variant of the product produced it.

AttributeQuestion it answers
tenant_id, marketWhose operation produced the event
service_model, tierWhich commercial configuration applied
app_version, config_versionWhich build and which configuration were running
feature_stateWhich flags and entitlements were active
experiment_id, variantWhether the user was exposed to a test, the basis for Workshops 3 and 4

Semantic conventions

OpenTelemetry defines common names for attributes of traces, metrics and logs. Agreeing names across services before the data exists is cheaper than mapping them afterwards.

OpenTelemetry (2024)

Product events meet the analytical base

Events from a product analytics tool, such as a Mixpanel export, are joined to orders through a stable key, and personal data is minimised or pseudonymised before it reaches the shared layers.

Worked example: two definitions of completed order

Two illustrative markets report completed orders for the same month. The numbers are small on purpose and are not those of the lab.

Market AMarket B
Local event that countspayment_capturedorder_delivered
Timestamp used for the monthServer time in UTCLocal time of the market
AmountNet of discountGross, discount in another column
Reported in March1,000 orders800 orders
What the comparison suggestsMarket A converts 25% more orders, which is false: A counts orders that may still be cancelled before delivery, and B counts only orders that reached the retailer.
The canonical definition chooses one lifecycle state and one time reference for every market and keeps the local rule as an attribute, so that each local team can still reproduce its own report from the gold layer.
Worked example: canonical metric, reconciliation and graph

The canonical metric is written once in the gold layer, reconciled with each local report and inserted in the orchestration graph as a single node that every consumer reads.

gold.fct_completed_order · grain: one row per order
SELECT o.order_id, o.market, o.tenant_id,
       d.local_business_date AS completed_date,
       o.net_amount_local,
       o.net_amount_local * fx.usd_per_unit AS net_amount_usd,
       o.local_completion_rule      -- extension, kept
FROM silver.order_lifecycle o
JOIN silver.dim_date_local d
  ON d.market = o.market AND d.utc_ts = o.delivered_at_utc
JOIN silver.fx_daily fx
  ON fx.currency = o.currency
 AND fx.rate_date = d.local_business_date
WHERE o.delivered_at_utc IS NOT NULL
  AND o.cancelled_at_utc IS NULL

Reconcile

Market A: 1,000 reported, 830 canonical; 170 explained by orders captured and cancelled before delivery. Market B: 800 and 800, amounts differ by the discount.

Place in the graph

One DAG owns the fact table; the finance and growth tables that recalculated the metric are rewired to read it and are then retired.

Groups, roles and differentiation by function

Groups of five or six participants work in breakout rooms on the shared template. Roles rotate every workshop of the track.

LLeadConducts the discussion and closes each decision
RRecorderWrites the Canonical Metric Spec in the template
TTimekeeperKeeps the five steps inside the 40 minutes
SSkepticChallenges every mapping that has not reconciled
FunctionLeads in the lab
Data engineersSilver model, data contract and, with orchestration experience, the reorganisation of the DAG graph
AnalystsCanonical metrics, grain and the link to the business indicator
Data scientists and ML engineersWhether the model serves feature needs by market, which prepares Workshop 2
Telemetry Harmonization Lab: the case

Tradeline's five markets instrument the checkout and fulfilment flow differently. Event names, columns, currencies, time formats and the attributes available change from file to file, and in one market a local regulatory rule changes when an order is considered completed.

FileContent
checkout_events_br|mx|co|za|do.csvOrder lifecycle events of each market from late August to October 2026, as each local team exports them
dim_retailer.csvGlobal retailer key, local key of each market, tenant, service model, segment and tier
fx_rates.csvDaily reference rate of each currency to US dollars
local_reported_kpis.csvCompleted orders and GMV that each local team reports for September and October, with its own definition
orchestration_graph.csv350 DAGs of eight domains, with owner, layer, output, upstream DAGs, schedule and deadline
Download the zip from the material page. In Databricks, run databricks_starter_bronze.py; without access, run starter_duckdb.sql in DuckDB. Both only land the files as text in bronze.
Telemetry Harmonization Lab: steps

Forty minutes in five steps. The timekeeper closes each step even if it is incomplete, and the recorder notes what was left open.

1Metric and grain

Define the canonical completed order, its time reference and the grain of the gold fact table. 8 min.

2Dimensions and contract

Design the conformed dimensions and draft the contract with a common core and extensible attributes. 8 min.

3AI mapping

Use the Databricks assistant or another tool approved by BEES to map three local schemas and generate the transformations. Validate by reconciling with the local reports. 12 min.

4Orchestration

In the graph, find the gold metrics calculated twice and decide where the canonical metric is calculated, its upstream DAGs, its reprocessing and its owner. 8 min.

5Business link

State how the metric feeds revenue per completed order and how a market comparison reads as impact. 4 min.

Choosing the three schemas

Map at least three of the five markets with the assistant. Choose them so that the three include different time formats and different currencies, because those are the differences a generated mapping most often gets wrong.

No-login alternative

If Databricks or the assistant is not available, the group works in DuckDB with the starter script and writes the mapping by hand in the template. The reconciliation step is the same.

Deliverable: Canonical Metric Spec

The group fills the template for the completed order metric and attaches the reconciliation table. The template is in the material and in the zip.

Spec sections

1 Identification and owner · 2 Definition, attribution moment and monetary basis · 3 Grain · 4 Conformed dimensions · 5 Local extensions · 6 Expected quality · 7 Point of calculation, upstream DAGs, backfill and deadline · 8 Reconciliation record

The deliverable is complete when

The local regulatory difference is preserved as a documented attribute instead of being eliminated by standardisation, and the canonical metric has a single point of calculation in the gold layer.

Every difference between the canonical value and a local report must have a written cause. A difference that the group cannot explain is recorded as open, which is an acceptable result for the lab and an unacceptable one for production.
Debrief: definitions and preserved differences

Groups compare their canonical definitions and the differences they kept as extensions. The facilitator collects one answer per group for each question.

Definitions

Which lifecycle state and which clock?

Did all groups choose the same state for completion and the same time reference for the month? Which local report could not be reproduced from the gold layer, and why?

Extensions

What was kept, and for whom?

Which local rule became an attribute, and which decision of the local team depends on it? Which attribute was dropped, and what would be lost if it were needed later?

AI

Where did the assistant fail?

Which part of the generated mapping did not survive reconciliation, and which test would have caught it before the numbers reached the board?

Orchestration

Who owns the metric?

Which DAGs were retired or rewired, which deadline constrained the design and which team answers when the number is questioned?

Formative rubric

The rubric guides feedback during the debrief. It does not produce a grade.

CriterionProficientDeveloping
Canonical modelComparable definitions with relevant differences preservedStandardisation that erases context
Contract and orchestrationContract with evolution rules, and a metric with a single point of calculation and explicit dependenciesSchema without versioning, or metric duplicated across pipelines
Use of AIMapping validated by reconciliationMapping accepted without verification
A frequent misconception is to create one pipeline per market to absorb each instrumentation variation. A canonical layer allows markets to be compared and keeps the differences that affect decisions as data, in one pipeline.
Post-work and bridge to Workshop 2

The post-work transfers the lab to a metric of the participant's own work, and Workshop 2 starts from the canonical gold layer to build features that are comparable across markets.

Post-work · 20 minutes

Canonical Metric Spec for a real metric

Definition, grain, required dimensions, local extensions, expected quality, point of calculation in the gold layer, orchestration dependencies and owner, for a metric whose definition changes across teams, customers or markets in your context. Do not include confidential names or numbers.

Next · Workshop 2

Feature Engineering and Data Preprocessing

Missingness and outliers across markets, normalisation, leakage, distribution shift and feature engineering with GenAI, built on the conformed dimensions and canonical metrics of this session.

About this session

Global Product Telemetry Foundation · Prof. Afonso

Learning objective

By the end of the session, participants should be able to define canonical events and metrics with tenant, market, version, configuration and feature state dimensions, model the gold layer of a medallion architecture with a declared grain and conformed dimensions, specify a data contract and the orchestration of the metric with a single point of calculation, and validate AI-generated schema mappings by reconciling aggregates.

Session strategy

Two-hour online workshop in the standard structure of the program. A retrieval poll connects the session to the recurrence signals of the Kick Off, a thirty-minute briefing covers high-scale orchestration, the gold layer, data contracts, AI-assisted mapping and multi-tenant telemetry, and the facilitator demonstrates on two illustrative markets how a canonical definition of completed order is written once, reconciled with local reports and placed in the orchestration graph. Groups of five or six, with rotating roles of lead, recorder, timekeeper and skeptic, then harmonise the checkout telemetry of five markets of the fictional company Tradeline into a Canonical Metric Spec, using Databricks or DuckDB, and the debrief compares definitions and the differences preserved as extensions.

Session structure

  1. Opening and retrieval poll — 10 min
  2. Concept briefing: orchestration, gold layer, contracts, AI-assisted mapping and telemetry — 30 min
  3. Worked example: two definitions of completed order — 15 min
  4. Break and group formation — 5 min
  5. Telemetry Harmonization Lab — 40 min
  6. Debrief — 15 min
  7. Transfer and post-work — 5 min