Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan

Explain Spark DAG in Pipelines

EasyPipelines00:00
Practice interviewer
In session
5 left
00:00

Your question is Explain Spark DAG in Pipelines. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Context

A Databricks customer runs nightly ETL on the Databricks Lakehouse using Delta Lake tables and Databricks Workflows. Their current jobs process raw billing, product usage, and account metadata into curated fact tables, but pipeline runtime has grown from 40 minutes to nearly 3 hours. The team wants a clear explanation of Spark's DAG execution model and how it should influence pipeline design, debugging, and optimization on Databricks.

Your task is to explain Spark DAG execution in the context of a production Databricks pipeline, not as a generic theory question. Assume the pipeline reads 12 TB/day from Bronze Delta tables, joins 3 large datasets, performs aggregations, and writes 8 partitioned Silver/Gold Delta tables. The SLA is 90 minutes end-to-end, with individual critical tables available within 20 minutes of source arrival. Peak cluster size is 64 workers, and the platform must support weekly backfills of up to 180 days.

Requirements

  1. Explain how Spark converts DataFrame or SQL transformations into a logical plan, optimized plan, physical plan, and DAG of stages/tasks on Databricks.
  2. Distinguish narrow vs. wide transformations and describe how shuffles create stage boundaries.
  3. Show how lazy evaluation affects ETL pipelines, especially when multiple actions or repeated reads are used in Databricks notebooks or Delta Live Tables-style patterns.
  4. Describe how DAG execution impacts join strategy, partitioning, caching, skew handling, and write performance to Delta Lake.
  5. Explain how you would inspect and troubleshoot the DAG using the Spark UI, Databricks query profile, event logs, and task-level metrics.
  6. Include concrete guidance for reducing runtime and avoiding unnecessary recomputation in a multi-step batch pipeline.

Constraints

  • Use Databricks-native terminology where possible: Delta Lake, Databricks Workflows, Unity Catalog, Spark UI, Photon.
  • Data contains PII governed by Unity Catalog; intermediate outputs must remain in approved storage locations.
  • Budget allows only a 20% increase in compute cost, so optimization should focus on DAG-aware design rather than brute-force scaling.
  • Backfills must be idempotent and must not corrupt downstream Delta tables.