ETL/ELT Patterns Interview Q&A
25 interview questions on ETL/ELT patterns and data transformation on Azure
Question 1: What is the difference between ETL and ELT?
Answer: ETL transforms before loading (staging area). ELT loads raw data first, transforms using target system capabilities. ELT leverages cloud data warehouse compute.
Question 2: When would you use ADF Copy Activity vs Data Flow?
Answer: Copy Activity: Simple data movement, format conversion, faster execution. Data Flow: Complex transformations (joins, aggregations), visual debugging, Spark-based.
Question 3: How do you implement idempotent data loading?
Answer: Use Delta Lake merge (upsert), watermarks with unique keys, checkpointing, and deduplication logic. Ensure same data can be reprocessed safely.
Question 4: What is the benefit of using Delta Lake for ETL?
Answer: ACID transactions, schema evolution, time travel for reprocessing, data skipping, and streaming support. Enables reliable ETL operations.
Question 5: How do you handle slowly changing dimensions?
Answer: SCD Type 1: Overwrite (MERGE UPDATE). SCD Type 2: Add new row with effective dates (MERGE INSERT). SCD Type 3: Add column for previous value.
Question 6: What is the benefit of incremental loading?
Answer: Processes only changed data, reducing processing time and costs. Use watermarks, CDC, or timestamps for change detection.
Question 7: How do you implement data quality checks in ETL?
Answer: Great Expectations for Python validation, ADF Data Flows for visual rules, Purview for classification, and SQL checks in Synapse.
Question 8: What is the difference between batch and micro-batch?
Answer: Batch: Process on schedule (hourly/daily). Micro-batch: Process small batches continuously (seconds). Use batch for large datasets; micro-batch for near-real-time.
Question 9: How do you handle schema changes in ETL?
Answer: Schema drift in ADF, Delta Lake mergeSchema, Purview schema discovery, and schema registry for versioned schemas.
Question 10: What is the benefit of using Synapse Serverless for ELT?
Answer: Query data in-place from ADLS, pay-per-TB-scanned, no infrastructure management, and external tables for schema-on-read.
Question 11: How do you implement fan-out/fan-in pattern?
Answer: Databricks workflows with task dependencies, ADF foreach activity, or parallel processing with merge at the end.
Question 12: What is the benefit of using stored procedures in Synapse?
Answer: Encapsulate business logic, parameterized execution, version control, and performance optimization with precompiled plans.
Question 13: How do you handle late-arriving data?
Answer: Stream Analytics late arrival policy, ADF watermarks with flexible windows, Delta Lake time travel for reprocessing.
Question 14: What is the difference between full and incremental load?
Answer: Full: Replace entire datasets (simple, expensive). Incremental: Process only changes (complex, efficient). Use watermarks for incremental.
Question 15: How do you implement CDC in Azure?
Answer: ADF CDC for SQL Server, Debezium for open-source databases, Cosmos DB Change Feed for NoSQL, and Event Hubs for streaming.
Question 16: What is the benefit of using CTAS in Synapse?
Answer: Creates new table with optimal distribution and indexing. Faster than INSERT INTO for large data loads. Avoids fragmentation.
Question 17: How do you handle data lineage in ETL?
Answer: Purview automatic lineage from ADF/Databricks/Synapse, custom lineage via SDK, and documentation in business glossary.
Question 18: What is the benefit of using parameters in ADF?
Answer: Reusability, environment promotion, dynamic content expressions, and separation of configuration from logic.
Question 19: How do you implement error handling in ETL?
Answer: Try-catch patterns, retry policies, dead-letter queues, logging, alerting, and quarantine for failed records.
Question 20: What is the difference between watermarks and CDC?
Answer: Watermarks: Track last processed timestamp/ID (requires timestamp column). CDC: Capture database changes from transaction log (more accurate, requires CDC enabled).
Question 21: How do you optimize ETL performance?
Answer: Parallel processing, appropriate file formats (Parquet), partitioning, CTAS for Synapse, and auto-scaling clusters.
Question 22: What is the benefit of using Databricks for ETL?
Answer: Spark-based processing, Delta Lake integration, notebook development, job orchestration, and Unity Catalog governance.
Question 23: How do you implement data masking in ETL?
Answer: Dynamic data masking in Synapse, custom masking logic in transformations, and Purview sensitivity labels.
Question 24: What is the benefit of using ADF Mapping Data Flows?
Answer: Visual ETL development, Spark-based execution, debugging with data preview, and integration with ADF orchestration.
Question 25: How do you test ETL pipelines?
Answer: Unit tests for transformation logic, integration tests with sample data, data quality validation, performance testing, and end-to-end testing.
Deep Dive: Practical Implementation
Architecture Patterns
| Pattern | Description | Use Case | Complexity |
|---|---|---|---|
| Lambda Architecture | Batch + serving layers | Historical + real-time | High |
| Kappa Architecture | Streaming-only | Real-time analytics | Medium |
| Micro-batch Architecture | Small batch processing | Near-real-time | Low-Medium |
| CDC-based | Change data capture | Incremental loads | Medium |
Production Checklist
- Implement idempotent pipeline operations
- Add dead-letter queues for failed records
- Set up comprehensive monitoring and alerting
- Configure automated backups and disaster recovery
- Document data lineage and dependencies
- Implement role-based access control
- Set up cost monitoring and budget alerts
- Create runbooks for common failure scenarios
- Establish SLA monitoring for data freshness
- Conduct regular security audits and penetration testing
Common Pitfalls
- Not handling schema evolution â Use schema registries and backward-compatible changes
- Ignoring data skew â Monitor distribution and rebalance when needed
- Over-orchestrating â Use simpler tools when they suffice
- No data quality checks â Implement validation at every stage
- Skipping documentation â Data catalogs prevent discovery chaos
- Not monitoring costs â Cloud costs can spiral without oversight
- Tight coupling â Design for loose coupling between components
- No testing strategy â Unit, integration, and data quality tests are essential
Interview Preparation
Q: How do you debug a failing pipeline? A: Check logs for errors, verify source data availability, inspect intermediate outputs, check resource utilization, review recent changes, and validate downstream dependencies.
Q: What is data observability and why does it matter? A: Data observability monitors data quality, freshness, volume, and lineage across the pipeline. It enables proactive issue detection, reduces debugging time, and builds trust in data products.
Q: How do you handle backfill scenarios? A: Use idempotent jobs, partition by date, monitor progress, validate outputs, and update downstream consumers. Consider using a dedicated backfill framework rather than ad-hoc scripts.
Extended Learning: Beyond the Basics
Key Concepts Summary
This lesson covers fundamental concepts that serve as building blocks for more advanced topics. Master these basics before moving to intermediate and advanced material.
Prerequisite Knowledge
Before studying this topic in depth, ensure you understand:
- Basic definitions and terminology
- Core formulas and their derivations
- Common applications in real-world scenarios
- Typical pitfalls and misconceptions
Step-by-Step Walkthrough
Let us work through a complete example to solidify understanding:
Step 1: Identify the problem type. Determine which category this problem falls into and which approach is most appropriate.
Step 2: Apply the relevant formula. Substitute known values into the appropriate equation, paying attention to units and constraints.
Step 3: Simplify and solve. Work through the algebra step by step, checking each intermediate result.
Step 4: Verify the answer. Check that the solution satisfies the original conditions and makes logical sense.
Common Mistakes to Avoid
- Misidentifying the problem type â Always start by categorizing the problem
- Incorrect formula application â Verify the formula applies to your specific case
- Unit errors â Always check units are consistent throughout
- Sign errors â Pay careful attention to positive and negative values
- Rounding too early â Keep full precision until the final answer
- Forgetting constraints â Check that solutions satisfy all given conditions
Real-World Applications
Understanding this concept is essential for:
- Advanced problem solving in examinations
- Building intuition for more complex topics
- Developing analytical thinking skills
- Applying mathematical reasoning to practical situations
Practice Exercises
- Basic: Solve 5 problems of increasing difficulty using the core concept.
- Intermediate: Apply the concept to word problems with multiple steps.
- Advanced: Combine this concept with 2-3 other topics in a comprehensive problem.
- Challenge: Create your own problem that requires this concept plus additional knowledge.
Interview and Exam Tips
- Common question patterns: Identify which exam or interview formats test this topic
- Time management: Practice completing problems within time constraints
- Common traps: Know the typical mistakes examiners set as distractors
- Verification strategy: Develop a quick method to check your answer
Related Topics
- Previous Topic â Build on the foundation laid here
- Next Topic â See how this concept extends to more advanced material
- Practice Problems â Additional exercises with solutions
- Video Explanation â Visual walkthrough of key concepts
Quick Reference Card
| Concept | Formula/Rule | Key Insight | Common Use |
|---|---|---|---|
| Core Definition | See main text | Understand the intuition | Foundation for all applications |
| Key Formula | See main text | Memorize the derivation | Direct problem solving |
| Special Case | See main text | Recognize when it applies | Simplifies complex problems |
| Edge Case | See main text | Know the limitations | Avoids errors |
Further Reading
For students who want to go deeper:
- Standard textbooks on the subject
- Research papers applying this concept
- Online courses with video explanations
- Practice problem collections with detailed solutions