Multi-Source Enterprise Data Platform
Architect and build a unified enterprise data platform that integrates four disparate operational sources (Customer DB, Sales Files, Product REST API, and Store Reference Data) into a conformed, trusted medallion lakehouse with cross-source entity resolution, freshness SLA tracking, and financial reconciliation in Snowflake.
Project Brief
Understand the challenges of heterogeneous enterprise data integration and master data unification.
Business Scenario
A rapidly scaling global enterprise manages business operations across multiple legacy and cloud-native systems. Customer profiles reside in an operational PostgreSQL database, daily sales transactions arrive as batch CSV/JSON files in Cloud Storage, product catalog metadata is retrieved via an external partner REST API, and store location reference data is managed in enterprise ERP tables.
Because these systems operate in silos with different update frequencies, mismatched natural keys, varying data quality standards, and delivery schedules, business analysts report conflicting customer counts, orphan transactions with missing product descriptions, and mismatched revenue numbers between store and online channels.
Development Objective
Architect and implement a unified, multi-source enterprise data platform in Databricks and PySpark. The platform must ingest all four disparate sources, standardize schemas into Bronze storage, execute entity resolution and cross-source joins in Silver, enforce strict data quality assertions and error isolation, track source data freshness SLAs, and publish a conformed, query-optimized Gold enterprise dimensional warehouse to Snowflake.
Expected Outcome
The defining challenge of an enterprise platform architect is managing heterogeneity and failure isolation. Your platform must demonstrate that downstream reporting remains reliable and consistent even when upstream sources experience schema drift, late arrivals, or temporary API outages.
Source System
Inspect the four source systems, ingestion cadences, schema specifications, and integration contracts.
Four Originating Enterprise Sources
The enterprise platform ingests from four distinct source systems with differing protocols and refresh intervals:
Source Schema Entities & Contracts
Known Cross-Source Edge Cases
Every source ingestion pipeline must be decoupled. Never run all four source extracts in a single brittle, monolithic script where one network timeout crashes the entire platform.
Expected Architecture
Unified lakehouse architecture: decoupled Bronze staging, Silver entity resolution, and Gold data mart.
Multi-Source Integration Flow
The architecture standardizes heterogeneous feeds into raw Bronze storage, performs entity resolution and cross-source joins in Silver, and publishes a unified Star Schema to Snowflake.
Architecture Expectations
In a multi-source platform, entity resolution must be centralized in Silver. Do not allow individual source ingestion jobs to execute cross-source joins before raw data has been safely landed in Bronze.
Development Requirements
Implement ingestion modules, entity mapping logic, dimensional modeling, and Snowflake synchronization.
Developer Responsibilities
The implementation must address the following 15 engineering requirements across multi-source ingestion, entity resolution, data quality, and dimensional delivery.
Source A (Customer DB) Ingestion
Ingest customer master records from relational database.
Source B (Sales Files) Ingestion
Ingest hourly transaction batch files from cloud storage.
Source C (Product REST API) Ingestion
Ingest product catalog metadata via external REST API.
Source D (Store Reference) Ingestion
Ingest store location reference tables.
Schema Normalization & Cleansing
Standardize column naming and data types across all Bronze feeds.
Cross-Source Entity Identifier Resolution
Map disparate natural keys into unified enterprise identifiers.
Late-Arriving Dimension Handling
Prevent dropped transactions when dimensions arrive late.
Conformed Dimension Modeling
Build enterprise conformed dimensions.
Enterprise Fact Table Construction
Assemble the centralized FACT_ENTERPRISE_SALES table.
Source Freshness & SLA Tracking
Monitor data arrival latency across all four source systems.
Cross-Source Financial Reconciliation
Guarantee 100% financial consistency across the enterprise.
Dead-Letter Quarantine Framework
Isolate malformed or corrupted records across all source feeds.
Snowflake Enterprise Serving Deployment
Publish unified dimensional models and views to Snowflake.
End-to-End Data Lineage Tracking
Track record provenance from source to Snowflake.
Configuration & Secrets Management
Externalize all connection parameters and credentials.
You are responsible for designing the exact surrogate key hashing algorithm, dimensional table partitioning, and Snowflake clustering keys. Document your design choices and justify their scalability.
Testing Requirements
Demonstrate multi-source ingestion, failure isolation, identifier mapping, freshness tracking, and reconciliation.
Required Test Scenarios
Validate the enterprise platform against the following 13 test scenarios:
An enterprise platform is validated by its ability to handle partial outages gracefully. Proving that an API outage does not corrupt sales facts or crash customer processing is essential.
Acceptance Criteria
Verify that the multi-source enterprise platform fulfills all production Definition of Done criteria.
Definition of Done
The enterprise platform is accepted when all 10 criteria are met:
Approval requires reconciliation query outputs proving that total revenue across all stores in Snowflake matches raw input files with zero variance.
Developer Deliverables
Submit all source ingestion modules, entity mapping logic, DDL scripts, and reconciliation evidence.
Required Deliverables
The submission must include the following 11 artifacts:
Ensure your test harness allows another engineer to simulate all four source feeds locally and verify the reconciliation output.
Engineering Constraints
Adhere to architectural, operational, and security boundaries for enterprise data platforms.
Required Boundaries
The solution must strictly comply with the following 10 constraints:
Hard-coding source mappings in monolithic scripts or dropping transactions due to missing product lookups violates enterprise architecture standards.
Suggested Project Structure
Recommended repository layout for production multi-source data platforms.
Recommended Project Layout
Structure your repository to separate source ingestion, entity mapping, dimension/fact transformations, sinks, and tests:
DEV-009-multi-source-enterprise-platform/
โ
โโโ README.md
โ
โโโ config/
โ โโโ dev.yaml
โ โโโ staging.yaml
โ โโโ prod.yaml
โ
โโโ src/
โ โโโ ingestion/
โ โ โโโ ingest_customer_db.py # PostgreSQL JDBC extractor
โ โ โโโ ingest_sales_files.py # Cloud Storage batch file reader
โ โ โโโ ingest_product_api.py # REST API client & pagination
โ โ โโโ ingest_store_ref.py # ERP store master extractor
โ โ
โ โโโ bronze/
โ โ โโโ bronze_writer.py # Append-only raw landing & metadata
โ โ
โ โโโ silver/
โ โ โโโ normalize.py # Schema normalization & typing
โ โ โโโ entity_resolution.py # Cross-source key mapping
โ โ โโโ late_dimensions.py # Unknown key (-1) mapper
โ โ โโโ quarantine.py # Multi-source bad-record handler
โ โ
โ โโโ gold/
โ โ โโโ dim_customer.py # Customer dimension (SCD 1/2)
โ โ โโโ dim_product.py # Product hierarchy dimension
โ โ โโโ dim_store.py # Store geography dimension
โ โ โโโ fact_enterprise_sales.py # Central enterprise sales fact
โ โ
โ โโโ monitoring/
โ โ โโโ freshness_monitor.py # Source arrival lag & SLA tracker
โ โ โโโ reconciliation.py # Financial variance checker
โ โ
โ โโโ serving/
โ โโโ snowflake_loader.py # Staging & merge loader for Snowflake
โ
โโโ ddl/
โ โโโ 01_dimensions.sql
โ โโโ 02_facts.sql
โ โโโ 03_presentation_views.sql
โ
โโโ tests/
โ โโโ test_source_isolation.py
โ โโโ test_entity_resolution.py
โ โโโ test_late_dimensions.py
โ โโโ test_freshness_sla.py
โ โโโ test_financial_reconciliation.py
โ
โโโ docs/
โโโ enterprise_data_model.md # Logical & physical ER diagrams
โโโ source_mapping_dictionary.md # Source-to-target attribute mappingsModule Responsibilities
Separating individual source extractors into dedicated modules ensures upstream API schema changes or network timeouts can be patched without impacting other source ingestion pipelines.
Submission Checklist
Final engineering quality checklist before submitting DEV-009.
Final Review Checklist
Verify every checklist item before submitting your enterprise platform:
Submit DEV-009 only after the four source extractors, entity resolution, conformed star schema, financial reconciliation, Snowflake sync, and freshness monitoring have been thoroughly validated.