DE Mastery GitHub

Apache Spark · SPK-02

Lazy evaluation and the DAG

From your world. dbt's compiled DAG vs. Spark's lazy job DAG

Practice quiz with instant feedback. For a scored run that counts toward your local progress, use uv run de quiz SPK-02.

1You run df2 = df.filter("x > 0").select("x", "y"). No action follows. How much data has Spark read from storage at this point?
2Which of the following are ACTIONS (they trigger a job)? (select all) (select all that apply)
3Which transformation causes a WIDE dependency (a shuffle)?
4A linear job reads a file, filters it, groups by a key and counts, then sorts the result. How many stages does it have?
5In a linear physical plan, how do you read the number of stages from df.explain('formatted')?
6You call df.count() and later df.collect() on the same uncached DataFrame. A long chain of transformations built it. What happens?
7Which is the closest Redshift analogue of a Spark Exchange node in a query plan?