In this lesson, you will learn how to design ingestion patterns that move raw data into a "landing zone" efficiently while keeping your data original and traceable.
The Landing Zone Strategy
In an ELT (Extract, Load, Transform) paradigm, the primary goal is to get data from your source into your storage layer as fast as possible without altering it. Think of your Landing Zone (often called a "Bronze" layer) as a digital filing cabinet for raw incoming mail. You don’t organize, clean, or filter the mail when it arrives; you simply store the envelope exactly as it was received.
By moving raw data directly to storage, you achieve two critical objectives:
- Source Fidelity: You preserve the original format (e.g., JSON, CSV, or logs). If a downstream transformation fails later, you can always go back to this landing zone to re-run your logic without re-querying the source system.
- Data Lineage: By capturing metadata at the moment of ingestion—such as
ingested_at_timestampandsource_system_id—you create a "birth certificate" for every record, allowing you to track exactly when and where the data originated.
Efficient Ingestion Pattern
To optimize this, avoid heavy processing during the load. Instead, use a "push" or "pull" pattern that treats the ingest process as a simple file-copy or stream-capture task.
Consider this pattern for capturing data:
# Pseudo-code representing an efficient landing zone ingest
def ingest_to_landing_zone(source_data, metadata):
# Preserve fidelity: store the raw blob directly
raw_payload = source_data.get_raw_content()
# Preserve lineage: inject tracking metadata
landing_record = {
"raw_data": raw_payload,
"metadata": {
"ingested_at": "2023-10-27T10:00:00Z",
"source_origin": "erp_system_v1",
"correlation_id": "uuid-12345"
}
}
# Save to storage (S3/ADLS/GCS)
storage.write(landing_record, path="/landing/source_system_v1/YYYY/MM/DD/")
By decoupling the ingestion from the transformation, you ensure your pipeline is resilient. If your source schema changes or your business requirements for the final data model shift, you have the historical record safely tucked away in your landing zone, untainted by previous processing steps.
Key Takeaway: In an ELT pipeline, optimize ingestion by storing raw data immediately with attached lineage metadata, ensuring you always retain a "source of truth" independent of downstream transformations.