Data Architecture Practices for Building a Reliable Business Data Foundation
This article examines how to build a verifiable business data foundation using general-purpose cloud capabilities on Baidu AI Cloud. Instead of retelling a brand story, it treats business certainty as an engineering problem: certainty comes not from more accurate forecasting, but from stable metric definitions, shorter data pipelines, and stronger fault tolerance. The discussion covers six areas—metric definition governance, dual-track currency accounting, regional data partitioning with degraded aggregation, unified batch-and-stream dashboards, data quality monitoring, and capacity and cost governance—along with a layered architecture, illustrative code, and a practical implementation checklist. The goal is to make business growth measurable, reproducible, and accountable.
In an environment of overall industry pressure and accelerating structural shifts, a leading luxury goods group still reported revenue growth for 25 consecutive quarters. Its leather goods and saddlery business grew more than 10% at constant exchange rates, making it a typical example of “certainty.”
This article does not retell the brand’s story. Instead, it breaks that certainty down into an engineering problem: certainty does not come from more accurate predictions, but from more stable metric definitions, shorter data pipelines, and stronger fault tolerance.
The article is organized around six areas:
- Metric definition governance
- Dual-track currency accounting
- Regional data partitioning and degraded aggregation
- Unified batch-and-stream dashboards
- Data quality monitoring
- Capacity and cost governance
For each area, it provides a layered architecture, illustrative code, and an implementation checklist. The goal is to help developers use general-purpose capabilities on Baidu AI Cloud—object storage, message queues, container platforms, log services, and monitoring and alerting—to build a verifiable business data foundation, so that business growth can be measured, reproduced, and held accountable.
1. Metric Definition Governance
The first source of uncertainty is inconsistent metric definitions. If “revenue” means different things in different dashboards, no amount of infrastructure can make the numbers reliable.
The core practice is to maintain a single metric dictionary that defines, for each metric:
- The business meaning
- The calculation formula
- The data source
- The refresh frequency
- The owner
All dashboards and reports must reference this dictionary rather than defining metrics locally.
metric:name: revenue_constant_fxmeaning: Revenue converted at constant exchange ratesformula: sum(net_sales * constant_fx_rate)source: sales_transactionrefresh: dailyowner: finance_data_team
2. Dual-Track Currency Accounting
Global businesses report in multiple currencies. Reporting only at actual exchange rates mixes business performance with currency fluctuations.
The solution is dual-track accounting: store both the original transaction currency amount and the constant exchange rate amount. Dashboards can then show both actual-rate and constant-rate views without recomputation.
SELECTregion,SUM(net_sales_local) AS net_sales_local,SUM(net_sales_local * constant_fx_rate) AS net_sales_constant_fx,SUM(net_sales_local * actual_fx_rate) AS net_sales_actual_fxFROM sales_transactionGROUP BY region;
3. Regional Data Partitioning and Degraded Aggregation
A single global table becomes a bottleneck as data volume grows. Partition data by region and time, and aggregate at the regional level first.
When a region’s data is temporarily unavailable, the dashboard should support degraded aggregation: show available regions and explicitly mark the missing ones, rather than showing an incomplete total as if it were complete.
partition: region + dateregional_aggregate -> global_aggregateif region_missing:show partial_total + missing_regions
4. Unified Batch-and-Stream Dashboards
Business users need both near-real-time views and stable daily numbers. A unified batch-and-stream dashboard serves both from the same metric definitions.
Stream data provides the operational view; batch data provides the official numbers. The dashboard labels which view is being shown.
stream_view: real-time, labeled "operational"batch_view: daily, labeled "official"same metric dictionary for both
5. Data Quality Monitoring
Data quality issues must be detected before they reach the dashboard. Monitor at minimum:
- Freshness: is data arriving on time
- Completeness: are expected partitions present
- Consistency: do regional sums match the global total
- Schema: have upstream fields changed
Alert on violations and block the affected dashboard from publishing.
checks:- freshness: partition_age < 2h- completeness: expected_regions_present- consistency: abs(regional_sum - global_total) < threshold- schema: upstream_schema_unchangedon_violation: alert + block_publish
6. Capacity and Cost Governance
A data foundation must be sustainable. Track storage growth, compute usage, and query cost per dashboard. Set retention policies for raw and aggregated data, and review capacity regularly.
track: storage, compute, cost_per_dashboardretention: raw (short), aggregate (long)review: capacity and cost periodically
Layered Architecture
The overall architecture is layered:
ingestion (object storage, message queue)-> processing (container platform, batch + stream)-> storage (partitioned by region and time)-> serving (dashboards, degraded aggregation)-> governance (metric dictionary, quality, cost)
Implementation Checklist
- Define a single metric dictionary with owners
- Store both local and constant exchange rate amounts
- Partition by region and time; aggregate regionally first
- Support degraded aggregation with explicit missing-region labels
- Serve batch and stream views from the same definitions
- Monitor freshness, completeness, consistency, and schema
- Track capacity and cost; set retention policies
Certainty is an engineering property. With stable definitions, short pipelines, and strong fault tolerance, business growth becomes measurable, reproducible, and accountable.
