Q1
In Azure Data Lake Gen2 + Databricks, why does writing thousands of tiny 5 KB Parquet files ('Small Files Problem') cripple Spark query speed—and how does Delta Lake solve it?
Spark spends more time opening file metadata headers and scheduling tasks than reading bytes. Delta Lake's OPTIMIZE (bin-compaction) + Z-Ordering merges small files into ~128 MB–1 GB columnar files with data skipping statistics.
Q2
In PySpark, what is the critical difference between Wide vs Narrow transformations (filter/withColumn vs groupBy/join) regarding Shuffle?
Narrow transformations process each partition independently without moving data across network nodes. Wide transformations require shuffling matching keys across executors over the network—the #1 cause of Spark OOM and latency spikes.
Q3
Why can joining a 10 GB DataFrame with a skewed key (NULL or 'UNKNOWN' holding 40% of rows) leave 99 Spark tasks done and 1 task stuck forever?
Data skew sends millions of NULL rows to a single executor partition, exhausting its memory/disk. Mitigate via Adaptive Query Execution (AQE skew join), salting skewed keys, or broadcasting small dimension tables (broadcast(dim_df)).
Q4
How does ADLS Gen2 Hierarchical Namespace differ from standard Azure Blob Storage for big data engines?
Flat Blob Storage fakes folders via / prefixes, turning a directory rename or delete on 100k Spark partitions into 100k slow metadata operations. ADLS Gen2 Hierarchical Namespace enables true atomic O(1) directory renames and POSIX ACLs.
Q5
How do Slowly Changing Dimensions (SCD Type 1 vs Type 2) get implemented atomically inside Databricks Delta Lake?
SCD Type 1 overwrites current values directly; SCD Type 2 preserves full historical audit versions (effective_from, effective_to, is_current) atomically in one transaction using Delta MERGE INTO.
Q6
Why does df.collect() or converting huge PySpark tables with .toPandas() crash Databricks driver nodes?
Worker executors distribute terabytes safely across the cluster, whereas .collect() / .toPandas() pulls ALL data back onto the single Driver JVM/Python RAM, triggering immediate Driver OOM.
Q7
In Azure Data Factory, when should you choose Copy Activity vs Mapping Data Flows vs Databricks Notebooks?
Use Copy Activity for fast raw ELT ingestion; Mapping Data Flows for visual low-code Spark transforms at moderate complexity; Databricks Notebooks when you need custom Python/PySpark unit testing, Delta Lake MERGE, or complex ML/streaming logic.
Q8
In Azure Synapse Dedicated SQL Pools, how do choosing HASH vs ROUND_ROBIN vs REPLICATE table distributions impact query speed?
Wrong HASH keys create data movement shuffles across all 60 compute distributions! REPLICATE small dimensions (< 2 GB) onto every node, HASH huge fact tables on join keys, and use ROUND_ROBIN for fast staging loads.
Q9
How does Medallion Architecture (Bronze -> Silver -> Gold) prevent silent downstream dashboard corruption?
Bronze retains immutable raw audit history; Silver enforces deduplication, schema types, and quarantine rules (expectations); Gold exposes clean Star Schema business aggregates without re-reading raw messy files.
Q10
What does VACUUM do in Delta Lake—and why does setting retention below 7 days risk breaking running readers?
Delta Lake keeps historical Parquet versions for Time Travel and concurrent snapshot isolation. Running VACUUM removes unreferenced older files; deleting files actively read by long-running queries crashes them unless safe retention holds.