Senior interviewers probe performance tuning, concurrency, distributed systems, and real-world edge cases:
Q16. How does the Delta Lake Transaction Log (_delta_log) guarantee ACID transactions?
Experienced • 3-5+ Yrs
Delta Lake writes atomic JSON commit files (000000.json, 000001.json) for every transaction using optimistic concurrency control. Every 10 commits, it compiles a checkpoint Parquet file. Queries read the latest checkpoint and replay remaining JSON files to obtain a perfectly consistent snapshot.
Q17. Explain Delta Lake Time Travel and how it is implemented.
Experienced • 3-5+ Yrs
Because Delta Lake maintains historical commit logs and data files, users can query past snapshots using VERSION AS OF or TIMESTAMP AS OF . Running VACUUM removes underlying unreferenced Parquet files older than a retention threshold, terminating Time Travel beyond that point.
Q18. How do you resolve Spark Shuffle and Skew issues in PySpark jobs?
Experienced • 3-5+ Yrs
Data Skew occurs when one partition is vastly larger than others, causing single tasks to take hours. Solutions: 1. Salting (appending random prefixes to skewed join keys to distribute data); 2. Broadcast Joins (broadcasting small tables to eliminate shuffles entirely); 3. Enabling Adaptive Query Execution (AQE: spark.sql.adaptive.skewJoin.enabled).
Q19. What is Adaptive Query Execution (AQE) in Apache Spark 3.x?
Experienced • 3-5+ Yrs
AQE re-optimizes query plans at runtime based on real stage execution statistics: 1. Dynamically coalescing post-shuffle partitions (combining tiny partitions); 2. Dynamically switching join strategies (e.g., converting Sort-Merge Join to Broadcast Hash Join if table shrinks); 3. Dynamically handling skewed joins.
Q20. Explain the difference between Broadcast Hash Join and Sort-Merge Join in Spark.
Experienced • 3-5+ Yrs
Broadcast Hash Join: Copies the smaller table (<10MB default, adjustable) to all executor nodes, executing joins in memory without network shuffles (fastest). Sort-Merge Join: Standard join for large tables; shuffles both tables by join key, sorts partitions, and merges matches (scales to petabytes but requires network I/O).
Q21. How does Snowflake Streams and Tasks enable Change Data Capture (CDC)?
Experienced • 3-5+ Yrs
A Stream records change data capture (CDC) deltas (inserts, updates, deletes) made to a table using metadata pointers without copying data. A Task schedules recurring SQL execution (cron-like). Together, they automate continuous pipeline ELT (consuming from stream and updating target tables).
Q22. Explain Dynamic Data Masking and Row Access Policies in Snowflake.
Experienced • 3-5+ Yrs
Dynamic Data Masking obfuscates sensitive data (e.g., PII: SSN, Email) at query runtime based on the caller's role (using CASE WHEN CURRENT_ROLE() = 'ADMIN' THEN val ELSE '***' END). Row Access Policies restrict which rows are returned based on user roles and attributes.
Q23. What is Z-Ordering (Liquid Clustering) in Databricks Delta Lake?
Experienced • 3-5+ Yrs
Z-Ordering is a multidimensional clustering technique that colocates related information in the same files based on specified columns, maximizing data skipping on queries filtering by those columns. Liquid Clustering (modern replacement) provides dynamic, incremental clustering without rewriting full datasets.
Q24. How do you optimize slow queries in Snowflake using Query Profile?
Experienced • 3-5+ Yrs
In Snowflake UI, inspect Query Profile: 1. Partitions Scanned vs Total Partitions (high ratio indicates poor pruning -> cluster table); 2. Spilling to Local Storage (virtual warehouse RAM exceeded -> size up warehouse); 3. Spilling to Remote Storage (extreme RAM shortage -> critical bottleneck); 4. Most expensive nodes.
Q25. Explain the difference between Auto-Drop, Auto-Suspend, and Auto-Resume in Snowflake.
Experienced • 3-5+ Yrs
Auto-Suspend: Automatically shuts down a warehouse after N seconds of inactivity to stop compute charges. Auto-Resume: Automatically wakes up the warehouse in milliseconds when a new query arrives. Auto-Drop applies to temporary or transient objects when sessions end.
Q26. What is dbt (data build tool) and how does it integrate with Snowflake/Databricks?
Experienced • 3-5+ Yrs
dbt manages the 'T' (Transform) in ELT. Data engineers write SQL SELECT models with Jinja templating. dbt handles dependency graphs (DAGs), materializations (views, tables, incremental models), automated testing (uniqueness, not null), and documentation generation.
Q27. Explain Structured Streaming in Databricks and how checkpointing works.
Experienced • 3-5+ Yrs
Structured Streaming is a scalable stream processing engine built on Spark SQL. It processes streaming sources incrementally as micro-batches. Checkpointing records current read offsets in cloud storage, guaranteeing fault tolerance and exactly-once processing across pipeline restarts.
Q28. What is the difference between Transient Tables and Temporary Tables in Snowflake?
Experienced • 3-5+ Yrs
Temporary Tables: Visible only within the creator session and automatically dropped upon session termination (0-1 day Time Travel, no Fail-Safe). Transient Tables: Persist indefinitely until explicitly dropped, have 0-1 day Time Travel, but zero Fail-Safe, saving storage costs for staging pipelines.
Q29. How do you implement CI/CD for Databricks Lakehouse pipelines using Databricks Asset Bundles (DAB)?
Experienced • 3-5+ Yrs
DAB allows defining Databricks jobs, pipelines, and notebooks as infrastructure as code in YAML files. Versioned in Git, CI/CD pipelines (GitHub Actions) test, validate, and deploy bundles across Dev, Staging, and Prod workspaces with unified permissions.
Q30. What is Search Optimization Service in Snowflake?
Experienced • 3-5+ Yrs
Search Optimization Service creates a background persistent search access path on high-cardinality tables. It accelerates point lookup queries (e.g., finding a single transaction ID or IP address among billions of rows) by orders of magnitude without requiring manual clustered keys.