Rana Maninder Singh
Lesson 5 of 12Cloud Data & AI Engineering

Azure Synapse Analytics

Lesson opener

In one line: A dedicated SQL pool stores tables you pay for while it is running. A serverless SQL pool queries files in the lake and does not keep those rows as its own tables.

Why it matters: Northline points Power BI at a serverless query over every raw stock file. The visual is slow, the bill follows the scan, and Sunday's file is still in the path. A dedicated table of the published day would have answered the same question from a smaller, named set. Figures are illustrative. DWU sizes below are labels from Microsoft's scale units, not a recommendation of a tier.

Before this lesson: You can land a raw file and refuse to publish it when the counts fail.

What you will be able to do

Prerequisites

Lessons 1 to 4. SQL from the SQL course helps you read the examples. It is not required to finish the practice.

Two ways to ask SQL questions

Azure Synapse Analytics includes Synapse SQL (https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/overview-architecture).

A dedicated pool is the place Northline loads published.stock_day after the factory gate passes. A serverless pool is the place an analyst checks one raw file before that load. Power BI's morning report reads the dedicated table, or a model built from it. It does not re-scan raw/stock/ for every visual.

Pausing dedicated compute stops that compute charge. It does not delete the tables. It also does not pause a serverless query that someone else is running over the lake.

def reporting_target(need_stored_table, scan_raw_every_refresh):
    if need_stored_table and not scan_raw_every_refresh:
        return "dedicated"
    if not need_stored_table and scan_raw_every_refresh:
        return "serverless-explore"
    raise ValueError("pick one job")

assert reporting_target(True, False) == "dedicated"
assert reporting_target(False, True) == "serverless-explore"

Teacher walkthrough: FX-100 on the morning report

All figures are illustrative.

  1. Curated stock for 2026-09-30 passed the row-count gate.
  2. A load writes published.stock_day in the dedicated SQL pool, with column as_of.
  3. The analyst may run a serverless query on raw/stock/2026-09-30/ while debugging a reject. That query is not the report.
  4. Validation: the report's FX-100 units equal the dedicated table, and the table equals the warehouse screen for that as_of. The raw folder can still contain an older file without changing the report.

A second workplace case

A finance user runs one ad hoc question: "which currencies appeared in yesterday's price file?" Loading a dedicated table for a single look is extra work. A serverless query on raw/price/2026-09-30/ answers it. The monthly price report still uses a dedicated table because finance refreshes it every morning.

Failure example: the report scans raw

Symptom: The stock visual times out on Monday. Cost for Synapse serverless jumps. The visual includes a file from a failed empty run that someone left in raw/stock/.

Diagnosis: Power BI's query lists the raw folder, not published.stock_day. Serverless SQL is doing what it is built to do: read the files you point at. The root cause is the report's source, plus a raw path that still holds a bad file.

Correction: Point the report at the dedicated table that loads only after run_ok. Keep serverless for exploration. Do not delete raw as your only fix. Fix the source of the visual.

Validation: The report query names published.stock_day. A bad file dropped into raw/stock/ does not change FX-100 on the visual. The dedicated count still matches the warehouse screen.

Guided practice: choose the pool

Scenario: Northline has a morning on-hand report for 200 items and a quarterly question that reads one archived file. Dedicated compute may be paused on weekends. Figures are illustrative.

Hints:

Complete solution:

The morning report uses the dedicated SQL pool and published.stock_day. Pause that compute on weekends if nobody queries it. The tables remain. The quarterly question can use serverless SQL on the archived file so you do not resize the warehouse for one look. The report must not read raw/. Validation is the item count and one item, FX-100, against the system of record for the same as_of.

Independent practice

Choose a pool for one report you know.

Acceptance criteria:

Common mistakes

  • Using serverless SQL as the direct source of a refreshed dashboard over all raw history.
  • Assuming pause deletes the warehouse tables.
  • Loading raw files, including failed extracts, into the dedicated table.
  • Picking a DWU number because a sample used it. Size is a measured choice. This lesson does not set one.

Quick check

  1. Which pool stores loaded tables in distributions?
  2. Which pool queries lake files without storing them as ordinary tables?
  3. What do you scale on a dedicated pool?
  4. Does pausing dedicated compute delete tables?
  5. Why did the failed raw file change the visual?

Answers:

  1. Dedicated SQL pool.
  2. Serverless SQL pool.
  3. Compute, described as DWUs or cDWUs depending on generation.
  4. No. It stops that compute. The tables remain.
  5. The visual read the raw folder, so a bad file was in the scan.

Quiz alignment

The quiz asks you to match dedicated and serverless to the job, to keep reports off raw scans, and to describe pause without deleting data.

Lesson summary

Dedicated SQL pool is the loaded warehouse you can pause. Serverless SQL pool reads files for exploration. Power BI's recurring report reads the published table. A raw file is not a report source just because SQL can see it.

Bridge to the next lesson

The next lesson uses Spark on Azure Databricks when the work is a large transform, not a SQL report. You will separate a lazy transformation from an action that actually runs.