Azure Synapse Serverless SQL vs Dedicated SQL vs Spark: A Beginner’s Starting Point

  • Azure Synapse Analytics DP-3012
  • Published by: André Hammer on Feb 25, 2024
Blog Alt EN

Azure Synapse Analytics brings several data processing choices together, so beginners often need a practical starting point that avoids overbuilding the first solution or creating avoidable cost and permission problems.

Azure Synapse Analytics brings SQL analytics, Apache Spark, data integration, and data warehouse capabilities into a single Azure workspace. For beginners, the practical starting point is usually a small lake-based exercise: connect storage, query files with Serverless SQL, transform data with Spark when needed, and only move to a Dedicated SQL pool when the workload is predictable enough to justify provisioned capacity.

What Azure Synapse Analytics is used for

Azure Synapse is designed for analytics workloads that need to work across files, tables, pipelines, notebooks, and reporting tools. A data analyst may use it to query Parquet files in Azure Data Lake Storage Gen2 with T-SQL, while a data engineer may use Spark notebooks to prepare Delta Lake tables for downstream reporting or machine learning.

The platform is useful because it does not force every workload into the same engine. Serverless SQL is suited to ad-hoc querying over files, Dedicated SQL pools are suited to provisioned warehousing, and Spark pools are suited to distributed transformation, notebook development, and Delta Lake writes. That distinction matters because many early Synapse projects become harder than necessary when every task is pushed into the first engine someone tries.

Synapse Studio is the browser-based workspace where most beginner activity happens. It gives access to data connections, SQL scripts, notebooks, pipelines, monitoring, and management settings. The experience is approachable, but the underlying architecture still depends on familiar cloud fundamentals: storage permissions, identity, networking, file layout, and cost controls.

Choosing between Serverless SQL, Dedicated SQL, and Spark

The first architectural decision in Synapse is not which feature looks most powerful; it is which compute model matches the workload. Serverless SQL is an on-demand T-SQL endpoint for reading files in storage, commonly through OPENROWSET. It is a good fit for exploration, lightweight reporting over lake files, and validating data before a more formal model is built.

Dedicated SQL pools use provisioned massively parallel processing capacity for relational data warehousing. They make more sense when the organisation has repeatable workloads, governed schemas, regular performance expectations, and enough usage to justify managing capacity. They should be paused when idle and scaled deliberately, because provisioned compute changes the cost model from occasional scans to reserved capacity.

Spark pools are managed Apache Spark clusters. They are the right choice for transformations that do not fit neatly into SQL, larger-scale data preparation, machine learning workflows, and Delta Lake table creation. Spark is also the correct choice when data needs to be written in Delta format; Serverless SQL can query compatible Delta data, but Spark is normally used to create and update it.

  • Use Serverless SQL for ad-hoc T-SQL over files in ADLS Gen2, early exploration, and quick Power BI prototypes.
  • Use Dedicated SQL for predictable, governed, high-throughput warehouse workloads with provisioned performance requirements.
  • Use Spark for transformation, notebooks, machine learning preparation, and Delta Lake writes.

This workload-based split is also a cost-control habit. Starting with Serverless SQL lets teams inspect existing lake data before committing to provisioned warehousing. Moving too quickly to Dedicated SQL can add management overhead, while using Spark for simple SQL exploration can introduce cluster start-up latency that does not help the task.

A practical 30-minute first build

A useful beginner exercise is to build a small end-to-end path rather than read about every Synapse feature. The goal is not to create a production platform in half an hour; it is to prove the main moving parts: workspace identity, lake access, SQL querying, Spark transformation, and reporting readiness.

Start by creating a Synapse workspace in the same Azure region as the storage account that will hold the data. Region alignment reduces unnecessary latency and avoids some avoidable data movement concerns. Link an ADLS Gen2 account as the workspace’s primary or linked storage, then confirm that containers and folders follow a simple pattern such as raw, curated, and presentation.

Permissions are the first place many beginners get stuck. Grant the Synapse workspace managed identity the Storage Blob Data Contributor role on the relevant container or storage account, then make sure ADLS access control lists allow the identity to traverse the folder path and read the files. RBAC and ACLs are related but different; having one without the other can still produce access errors. Readers who need a storage primer can use this guide to Azure Data Lake Storage Gen2 basics.

After permissions are in place, upload a small CSV or Parquet file to the raw folder. In Synapse Studio, open a SQL script against the built-in Serverless SQL endpoint and run a narrow query. Avoid SELECT * against a broad folder when testing; it can scan more data than expected.

SELECT TOP 100
    nyc.filepath(1) AS source_folder,
    nyc.*
FROM OPENROWSET(
    BULK 'https://<storage-account>.dfs.core.windows.net/<container>/raw/trips/year=2026/*.parquet',
    FORMAT = 'PARQUET'
) AS nyc
WHERE nyc.filepath(1) = 'year=2026';

The exact columns depend on the file being queried, so the query should be adjusted to the sample data. The important habit is to point at a specific folder or partition and filter early where possible. Serverless SQL charges by data processed, so file pruning, partition filters, and avoiding unnecessary columns are practical cost controls rather than optimisation trivia.

Once the first query works, create an external table as select, commonly called CETAS, to materialise a curated result as Parquet. This is useful when repeated reports should read a smaller, cleaner dataset instead of rescanning raw files every time.

CREATE EXTERNAL FILE FORMAT ParquetFormat
WITH (FORMAT_TYPE = PARQUET);

CREATE EXTERNAL DATA SOURCE CuratedLake
WITH (
    LOCATION = 'https://<storage-account>.dfs.core.windows.net/<container>/curated/'
);

CREATE EXTERNAL TABLE dbo.curated_trips
WITH (
    LOCATION = 'trips/',
    DATA_SOURCE = CuratedLake,
    FILE_FORMAT = ParquetFormat
)
AS
SELECT
    vendor_id,
    pickup_datetime,
    dropoff_datetime,
    passenger_count,
    trip_distance
FROM OPENROWSET(
    BULK 'https://<storage-account>.dfs.core.windows.net/<container>/raw/trips/*.parquet',
    FORMAT = 'PARQUET'
) AS trips
WHERE pickup_datetime >= '2026-01-01';

The next step is to create a small Spark pool and run a notebook. Spark pools can take time to start, so cold starts should be expected in beginner testing and scheduled workloads. Autoscale helps manage capacity, but it does not remove start-up latency; time-sensitive jobs may need warm-up planning.

from pyspark.sql.functions import col

source_path = "abfss://<container>@<storage-account>.dfs.core.windows.net/raw/trips/"
delta_path = "abfss://<container>@<storage-account>.dfs.core.windows.net/curated/delta/trips/"

trips = spark.read.parquet(source_path)

clean_trips = (
    trips
    .filter(col("trip_distance") > 0)
    .filter(col("passenger_count") > 0)
)

clean_trips.write.format("delta").mode("overwrite").save(delta_path)

This notebook reads raw Parquet data, applies simple filters, and writes a Delta table. Delta Lake adds transaction support on top of Parquet for Spark workloads, which is useful when curated datasets need reliable updates. In real projects, Spark jobs should also address the small-files problem by compacting output files; too many tiny files can slow both Spark jobs and Serverless SQL scans.

For quick visualisation, Power BI can connect to the built-in Serverless SQL endpoint and query external tables or views. When a semantic model becomes more governed, performance-sensitive, or shared across many users, a Dedicated SQL pool may be a better serving layer. A focused walkthrough is available for readers who want to connect Power BI to Azure Synapse.

Cost and governance habits to learn early

Synapse cost management begins with understanding which services are consumption-based and which are provisioned. Serverless SQL charges by the amount of data processed, so wide scans over large folders can become expensive even when the query feels simple. Dedicated SQL pools consume provisioned capacity while running, so pausing idle pools is one of the most important beginner habits.

Spark pools are also affected by configuration choices. A small pool is usually enough for early notebook experiments, while larger pools should be justified by workload size and runtime requirements. Autoscale can help match capacity to workload, but it should be paired with monitoring so that slow jobs are not automatically treated as a reason to add more compute before file layout and transformations are reviewed.

Governance should be introduced from the first workspace rather than postponed until production. Use the workspace managed identity for storage access, place secrets in Azure Key Vault through a linked service, and consider private endpoints for production environments. These controls reduce credential sprawl and make access easier to audit.

Data locality is another practical concern. Keeping the Synapse workspace, storage account, and major consumers in compatible regions helps reduce latency and avoids unnecessary cross-region movement. This is especially relevant when Power BI, data lake storage, and Synapse are part of the same reporting path.

Common beginner problems and how to fix them

The most common access issue is confusing Azure role assignments with ADLS Gen2 access control lists. Storage Blob Data Contributor may allow data operations at the Azure resource level, but hierarchical namespace ACLs still govern folder traversal and file access. If a query fails with a storage permission error, check both the role assignment and the execute/read permissions on each folder in the path.

Another frequent problem is scanning too much data with Serverless SQL. A query that points at a top-level folder may touch many files, even when the report needs only one month or one business unit. Use partitioned folders, filename or filepath filtering where appropriate, and curated Parquet outputs created with CETAS to keep repeated scans smaller.

Spark cold starts can be mistaken for poor code performance. The first notebook session may wait while the pool starts, and scheduled jobs can show similar behaviour if the pool has been idle. For production schedules, teams should account for start-up time, test realistic runtimes, and compact small files so that Spark is not spending excessive time listing and opening thousands of tiny objects.

Networking can also block early tests. Firewalls, managed virtual networks, private endpoints, and storage account network rules need to be aligned. If Synapse Studio can see the workspace but queries cannot read the lake, the issue may be network access rather than SQL syntax or Spark code.

How Synapse fits into a learning path

Beginners with a SQL or BI background often learn Synapse fastest by starting with Serverless SQL, because it reuses familiar T-SQL patterns while introducing lake storage. From there, Spark notebooks add distributed processing and Delta Lake concepts. Dedicated SQL should come later unless the learner is already working on a warehouse migration or governed reporting model.

This progression also mirrors how many pilot projects should be run. First, inspect the files that already exist. Next, create a curated output. Then decide whether reporting needs the flexibility of Serverless SQL, the structure of Dedicated SQL, or the transformation power of Spark. Readynez can support this kind of structured skill development in Microsoft cloud topics, but the decision about which Synapse engine to learn first should come from the workload rather than the course catalogue.

FAQ

What is Azure Synapse Analytics?

Azure Synapse Analytics is a Microsoft cloud analytics service that combines SQL querying, Apache Spark, data integration, and data warehousing capabilities in a single workspace. It is commonly used to analyse data stored in Azure Data Lake Storage Gen2, build curated datasets, and serve data for reporting and analytics.

Should a beginner start with Serverless SQL, Dedicated SQL, or Spark?

Most beginners should start with Serverless SQL if they already know SQL and want to explore files in a data lake. Spark is the next step for transformation and Delta Lake work. Dedicated SQL is usually better once the workload has predictable warehouse requirements and needs provisioned performance.

Can Serverless SQL write Delta Lake tables?

No. Spark is normally used to create and update Delta Lake tables in Synapse. Serverless SQL can be used to query supported lake data, but it should not be treated as the engine for Delta writes.

How can Synapse costs be controlled during learning?

Start with Serverless SQL for exploration, filter queries to avoid scanning unnecessary files, use Parquet and curated outputs where practical, and keep Dedicated SQL pools paused when idle. For Spark, begin with small pools and review file sizes before scaling compute.

Why do Synapse queries fail even when permissions seem correct?

In ADLS Gen2, both Azure RBAC and folder-level ACLs may be involved. The workspace managed identity may need Storage Blob Data Contributor at the container or account level, plus execute and read permissions along the folder path. Network rules and firewalls can also prevent access.

Building the first Synapse pilot with confidence

The safest way to learn Azure Synapse is to start small and make each architectural choice visible. Query files with Serverless SQL, materialise useful outputs with CETAS, use Spark when transformations or Delta Lake writes are required, and reserve Dedicated SQL for governed warehouse workloads with predictable demand.

A practical next step is to build the 30-minute path in a non-production workspace, document the permissions and cost controls used, and then decide which engine fits the real workload. Readynez provides Microsoft-focused training for teams that want guided development; to discuss a suitable learning path, contact Readynez. The original related Microsoft course page remains available here: Microsoft 365 Copilot productivity course.

A group of people discussing the latest Microsoft Azure news

Unlimited Microsoft Training

Get Unlimited access to ALL the LIVE Instructor-led Microsoft courses you want - all for the price of less than one course. 

  • 60+ LIVE Instructor-led courses
  • Money-back Guarantee
  • Access to 50+ seasoned instructors
  • Trained 50,000+ IT Pro's

Basket

{{item.CourseTitle}}

Price: {{item.ItemPriceExVatFormatted}} {{item.Currency}}