Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Design task logic for Lakeflow Jobs

A worked example

Complete the statement

You are designing a production Lakeflow Job with three tasks:

  • refresh_views: a SQL task that runs a saved query. The team does not want to manage any warehouse infrastructure for it.
  • score_bookings: a Notebook task. It needs a specific Spark version and a memory-optimized instance type. It is resource-intensive and must not share memory or CPU with any other task in the job.
  • export_files: a Python script task. It has no Spark version, library or instance type requirements. Cluster management overhead for it must be kept as low as possible.

How should you assign compute to the tasks?

Run refresh_views on , run score_bookings on , and run export_files on .

  • Blank 1: a serverless SQL warehouse (correct answer)

    A serverless SQL warehouse is correct because SQL tasks run on a serverless or pro SQL warehouse, and serverless means no infrastructure to manage. A pro SQL warehouse supports SQL tasks, but the team’s infrastructure-management requirement favors a serverless SQL warehouse. Serverless jobs compute and classic jobs compute are wrong because SQL tasks run on SQL warehouses, not on jobs compute.

  • Blank 2: a dedicated classic jobs cluster (correct answer)

    A dedicated classic jobs cluster is correct because classic compute lets you choose the Spark version and instance type, and a dedicated cluster isolates a resource-intensive task. A shared classic jobs cluster is wrong because tasks on the same cluster share memory and CPU. Serverless jobs compute is wrong because classic compute is the option to use when you need a specific Spark version and instance type. Serverless pipeline compute is wrong because it is for Lakeflow pipeline tasks, not notebook tasks.

  • Blank 3: serverless jobs compute (correct answer)

    Serverless jobs compute is correct because it is the recommended compute for Python scripts, and it removes cluster management overhead. Classic jobs compute is wrong because you must manage its cluster configuration, which the scenario asks you to minimise. A serverless SQL warehouse is wrong because it runs SQL tasks, not Python scripts. Serverless pipeline compute is wrong because it is for Lakeflow pipeline tasks.

Why

Tasks in the same job can use different compute, so each task gets the resource that fits its own requirements. The SQL task needs a SQL warehouse, and the serverless type avoids infrastructure management. The scoring notebook needs control over Spark version and instance type, which classic compute gives. It also needs its own cluster so it does not share memory and CPU with other tasks. The Python script has no special needs, so serverless jobs compute keeps management overhead lowest.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free