Skip to main content
๐Ÿ“˜ Complete PDF

Databricks Certification Practice Test 05

Practice Test 05

Question 1 of 10
๐Ÿ“‹ Multiple Choice
Question 81
A retail company stores raw files exactly as received from source systems. According to Medallion Architecture, these files should typically be stored in the _____ layer.
A. Gold layer
B. Silver layer
โœ“
C. Bronze layer
D. Semantic layer
Answer
โœ… C. Bronze layer
Explanation

1. Concept Overview / Core Concept / Direct Confirmation In the Databricks Lakehouse Medallion Architecture, the **Bronze layer** (often referred to as the raw or ingestion table zone) is the foundational data tier dedicated to storing raw, unprocessed data exactly as received from source systems (APIs, transactional databases, IoT streams, or flat files).

2. Why This Answer Is Correct / Detailed Breakdown The Medallion Architecture establishes a multi-hop pipeline that guarantees data quality, lineage, and auditability: - **Bronze Layer (Raw Ingestion):** Captures incoming records append-only in their native format, preserving the full fidelity of source payloads alongside ingestion metadata (such as `_rescued_data`, ingestion timestamp, and source file name). No destructive transformations, filtering, or aggregations are applied. - Storing raw data in Bronze ensures organizations have an immutable historical audit trail. If downstream business logic changes or a bug is discovered in cleansing code, the entire lakehouse can be reprocessed from the raw Bronze foundation without requesting backfills from operational source databases.

3. Why Other Options Are Incorrect / Distractor Analysis - **A. Gold layer:** The Gold layer represents curated, aggregated, and highly modeled business-level data products (such as star schemas, Kimball marts, or dimensional aggregates) tailored for BI dashboards, reporting, and executive metrics. Storing raw data in Gold directly violates architectural standards. - **B. Silver layer:** The Silver layer represents cleansed, deduplicated, standardized, and enriched data. In Silver, raw JSON fields are unpacked, foreign keys are validated, datatypes are cast, and data quality expectations are enforced. It is not the landing zone for untouched raw files. - **D. Semantic layer:** A semantic layer is a modeling abstraction (such as metrics definitions, BI semantic models, or cube definitions) that sits on top of analytical tables to provide unified business metrics to end users. It is not a physical storage tier for raw files.

4. Architectural & Execution Context / Physical Execution In Databricks, Bronze tables are typically persisted as Delta Lake tables backed by cloud object storage (AWS S3, Azure ADLS Gen2, or GCP Cloud Storage): - Ingestion is commonly orchestrated via Databricks **Auto Loader** (`cloudFiles`) or Delta Live Tables (DLT). - Auto Loader automatically detects arriving files, infers initial schemas, and appends records into Bronze Delta tables without requiring manual schema definitions. - The transaction log (`_delta_log/`) provides ACID transactional guarantees, ensuring that concurrent batch and streaming writes into Bronze never leave corrupted or partial parquet files.

5. Practical Code Example

# Ingesting raw JSON files into the Bronze tier using Auto Loader
from pyspark.sql.functions import current_timestamp, input_file_name

(spark.readStream
    .format("cloudFiles")
    .option("cloudFiles.format", "json")
    .option("cloudFiles.schemaLocation", "/mnt/datalake/checkpoints/bronze_orders_schema")
    .load("/mnt/raw_landing/orders/")
    .withColumn("ingestion_timestamp", current_timestamp())
    .withColumn("source_filename", input_file_name())
    .writeStream
    .format("delta")
    .outputMode("append")
    .option("checkpointLocation", "/mnt/datalake/checkpoints/bronze_orders")
    .toTable("retail_catalog.bronze.orders")
)

6. Key Concept to Remember / Key Takeaway Think of the Bronze layer as the digital photocopier of your source systems: it preserves raw, immutable history so you can always replay and verify downstream transformations.

7. Best Practice & Production Recommendation Always append operational metadata columns (such as ingestion timestamp, file path, and batch ID) when writing to Bronze. Enable schema evolution with `cloudFiles.schemaEvolutionMode = "addNewColumns"` and configure a rescue column (`cloudFiles.rescuedDataColumn`) so unexpected schema changes or malformed JSON payloads are preserved rather than dropped.

8. Real-World Engineering Scenario A global payment processing platform ingested millions of webhook payloads from merchant terminals into a Bronze Delta table. Six months later, a fraud detection model required a previously ignored device fingerprint embedded within the raw payload. Because the Bronze tier stored the raw, untouched JSON strings, the data engineering team simply ran a backfill notebook parsing the historical Bronze records into a new Silver feature table in hours, without impacting production transactional databases.

9. Common Exam Trap / Anti-Pattern / Misconception A frequent exam trap is assuming that data cleansing, deduplication, or schema validation should occur *before* or *during* Bronze ingestion. In Lakehouse architecture, applying transformations prior to Bronze destroys original raw fidelity and prevents reprocessing. Ingestion into Bronze must be EL (Extract-Load), with transformation (T) occurring between Bronze and Silver.

10. Related InsightfulSaga Tutorial Review Lakehouse data tiering principles in [Lakehouse Medallion Architecture Model](/tutorials/databricks/lakehouse-medallion-model).

Answered: 0 / 10
Question Navigator (Test 05)0% Answered