Learn PySpark and the Spark UI Free, on Your Own Laptop

Most Spark tutorials stop at the code. The skill that makes you good at Spark is reading what the engine did: which jobs ran, where data was shuffled, and why one join was fast and another slow. That is what the Spark UI shows. This guide takes you from nothing to running PySpark on your own laptop and reading its UI in about ten minutes, free, without installing Java, Python or Spark yourself.

Open the Spark Lab

What you need

Only Docker Desktop, installed and running. The Spark Lab brings its own Java, Python and Spark inside a container. You also need a laptop with at least 8 GB of memory for comfortable practice. Everything runs on your own computer, so there is no cluster to pay for and your files are never uploaded to Data Utility.

Step 1: set up the lab (first time only)

Open the Spark Lab. In a terminal (Terminal on Mac, PowerShell on Windows), copy and run the Set up command shown on the page. It downloads a small lab image and takes a few minutes the first time.

Step 2: start the lab

Run the Start command from the page and keep that terminal open. It prints a token and shows how much memory and disk space Spark may use. The command includes a Docker volume, so everything you add or save is kept after you stop the lab.

Step 3: connect

Paste the token on the Spark Lab page and click Connect. A short dialog asks whether to connect to your lab. Click Yes and a small connection window opens. Keep it open while you practise; you can minimise it. If your browser blocks the pop-up, allow it for the site and click Connect again. The code editor then opens.

Step 4: run a lesson and open the Spark UI

Pick a lesson, click Run, then Open Spark UI. Each run is labelled "Run 1", "Run 2" and so on in the Jobs tab, so you can match a job to the code that made it. Every lesson says what to look for.

The ten lessons

  • Reading a CSV and why it starts small jobs.
  • Narrow transformations: filter and select stay in a single stage.
  • groupBy and the shuffle: two stages with an Exchange between them.
  • Joining two tables and reading the plan: BroadcastHashJoin.
  • Turning broadcast off to see a SortMergeJoin.
  • cache() and the Storage tab.
  • repartition and coalesce, counted in tasks.
  • Spark SQL and the DataFrame API giving the same plan.
  • Saving a result with export() and keeping it in Recent files.
  • Writing to the Docker disk and finding the write in the Spark UI.
  • Four Delta Lake lessons: write a Delta table, update and delete, time travel, and MERGE, with every commit shown in the Delta log panel. See Learn Delta Lake without Databricks.

Use your own data

Click Upload a file to copy a CSV, JSON or Parquet file into the lab. Code to read it is added to the editor. Or click From recent files to pull in a file you already converted or cleaned in Data Utility, for example a CSV you turned into Parquet with the Format Converter. It is copied into the lab as Parquet, so the column types are kept.

Save your result and keep its lineage

Write a result with export(df, "name") (add "parquet" as the third argument for Parquet; the default is CSV). It appears under Outputs on the page. Click Save to recent and it joins your Recent files. Its history then shows every step: the original file, the conversion, and the Spark step with the code you ran. You can see it on the Data Lineage page.

See the files in Docker

The page gives you copy-paste commands for the terminal. While the lab runs, docker exec lists /data/outputs and docker cp copies the folder to your computer. After you stop the lab, a one-line docker run copies the files out of the saved volume. If you started the lab with a folder from your computer, the results are already in spark-lab/outputs.

Is my code private?

Yes. The page sends your code to the lab on your own computer. The lab only answers datautility.in, and only with the token from your terminal. Data Utility never sees your code, output or files.

Troubleshooting

  • The pop-up did not open: allow pop-ups for datautility.in, then click Connect again.
  • Wrong or missing token: the token changes every time you start the lab. Copy the new one.
  • Could not reach the lab: check that the Start command is still running in the terminal.
  • The page says your lab is an older version: stop it with Ctrl+C, run the Set up command again, then Start.
  • Port already in use: stop any other lab with docker stop, then start again.

Open the Spark Lab

Also try

How to use the Spark Lab: step by step

  1. Install and open Docker Desktop
  2. Run the Set up and Start commands from the Spark Lab page
  3. Paste the token, connect, and say Yes to the pop-up
  4. Run a lesson, then open the Spark UI

When to use the Spark Lab

  • Preparing for a data engineering interview
  • Learning why a Spark job is slow
  • Teaching a Spark class without a cluster
  • Trying PySpark on your own CSV or Parquet files

Frequently asked questions

Do I need to install Spark or Java?

No. Only Docker Desktop. The lab brings Java, Python and Spark.

Is the Spark Lab free?

Yes. It runs on your own computer, so there is no cluster to pay for.

Where is my data stored?

On your own computer, in a Docker volume (or a folder you choose). It is never uploaded to Data Utility.

Does it work on Windows, Mac and Linux?

Yes, anywhere Docker Desktop runs. The Set up and Start commands are the same and work in PowerShell, Command Prompt and Terminal. Only the folder option and the copy-after-stop command have a Windows version, which the page shows.

Tip: Run the same lesson twice and compare the two jobs in the Spark UI. Small changes, such as cache() or turning broadcast off, are easy to see side by side.