🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

ELT Patterns: ADLS → Synapse Serverless → Dedicated

Azure Data EngineeringELT Patterns⭐ Premium

Prerequisites

  • !ADLS Gen2 folder and file layout
  • !SQL views, CTEs and basic window functions
  • !Rough idea of what a dedicated SQL pool charges for

What You'll Learn

  • 1Explain why load-first changes where transformation cost is paid
  • 2Query raw files directly with serverless SQL and external tables
  • 3Promote a query into a materialised model deliberately
  • 4Choose between serverless and dedicated for a given workload
  • 5Avoid the cost traps that make a serverless estate expensive

Load first, transform where the compute is cheapest

Extract, load, transform puts ingestion and storage ahead of any transformation, so raw data lands untouched and the question of how to shape it is deferred until you can see it. That deferral is the entire value. Schema assumptions made before data arrives are guesses; ones made after a profiling pass are findings.

The pattern suits an estate where the questions are not yet known. A new source arrives, lands in the raw zone within minutes, and becomes queryable through a SQL endpoint without anyone writing a pipeline first. Analysts can profile it, data engineers can decide whether it belongs in the curated model, and nobody has built throwaway transformation code for data that might be discarded.

The trade-off is that transformation cost moves to query time. Every reader re-evaluates the logic unless someone materialises it. On a warehouse with per-query billing that is a real bill; on a serverless endpoint billed per terabyte scanned it is a directly measurable bill, which at least makes the trade-off visible rather than hidden in a cluster's idle time.

AspectTransform before loadLoad then transformWhere it shows up
Time to first querySlow, pipeline must be builtFast, external table is enoughDays versus minutes
Cost locusDedicated compute during the runQuery time or materialisation stepCluster bill versus per-TB scan
Correctness riskRules applied to data you have not profiledRules refined against real samplesWrong assumptions baked in
StorageCurated output onlyRaw plus curated plus modelsADLS capacity and tier
Backfill storyRe-run the pipelineRe-run the model build from rawOperational effort

Querying files without creating tables

Synapse serverless SQL exposes a SQL endpoint over files in ADLS. A view over OPENROWSET with an explicit container, path and format gives a queryable surface in seconds, with partition and row-set statistics pushed down so only the files your predicate touches are read.

The important discipline is that the view is a contract, not a scratch pad. Views written directly against OPENROWSET paths with embedded column lists break the moment a producer changes a file layout. Wrapping them in a schema, naming them consistently and placing them under source control turns a useful shortcut into a maintainable asset.

-- A contract over raw files rather than a one-off query
CREATE OR ALTER VIEW raw.v_orders AS
SELECT
    TRY_CAST(JSON_VALUE(payload, '$.orderId') AS bigint)      AS order_id,
    TRY_CAST(JSON_VALUE(payload, '$.customerId') AS nvarchar(32)) AS customer_id,
    TRY_CAST(JSON_VALUE(payload, '$.amount') AS decimal(18, 2))   AS amount,
    TRY_CONVERT(datetime2, JSON_VALUE(payload, '$.eventTime'), 126) AS event_time,
    _adls_path AS source_file,
    _adls_last_modified AS landed_at
FROM OPENROWSET(
    BULK 'https://stdatalake.dfs.core.windows.net/raw/orders/dt=*/*.jsonl',
    FORMAT = 'CSV',
    FIELDTERMINATOR = '0x0b',
    FIELDQUOTE = '0x0b',
    SINGLETON = '{"json": "payload"}'
)
WITH (
    payload nvarchar(max) '$.json',
    _adls_path nvarchar(4000) '$.path',
    _adls_last_modified datetime2 '$.last_modified'
) AS rows;

Two details matter in practice. The wildcard on dt= lets the query prune by partition, so a filter on that column reads fewer files instead of scanning everything. And TRY_CAST rather than CAST returns null for a malformed value instead of failing the whole query, which is the difference between a report with a gap and a report that does not render.

Promoting a model into a real table

Serverless queries are the right way to understand a dataset and the wrong way to serve a dashboard that runs the same join fifty times a day. Promotion means materialising the view into a Delta table or a dedicated pool table with distribution, indexing and statistics chosen for the access pattern.

Promotion should be a deliberate, versioned step. The model definition lives with the pipeline that builds it, the build is triggered by new raw data arriving, and the output lands in the curated zone with a freshness marker. A promoted table with no owner and no refresh job is the ELT equivalent of an unowned scheduled script.

-- Promote the view into a curated Delta table with explicit distribution
CREATE TABLE sales_curated.fact_order
WITH (
    DISTRIBUTION = HASH(order_id),
    CLUSTERED COLUMNSTORE INDEX,
    PARTITION (order_date RIGHT RANGE FOR VALUES ('2026-01-01'))
)
AS
SELECT
    o.order_id,
    o.customer_id,
    o.amount,
    CAST(o.event_time AS date) AS order_date,
    c.segment
FROM raw.v_orders o
LEFT JOIN sales_curated.dim_customer c
  ON o.customer_id = c.customer_id;

UPDATE STATISTICS sales_curated.fact_order WITH FULLSCAN;

The CTAS approach builds and populates in one step, which is convenient for a first load and dangerous for a repeat one because it creates a new table each run. For steady state, switch to an insert into an existing structure, or in a Delta table a MERGE on the natural key, so re-running the promotion is safe.

Choosing between serverless and dedicated

Serverless SQL is billed per terabyte scanned and requires no capacity planning. It excels at ad hoc exploration, one-off audits and workloads where the query pattern is unknown. Its weakness is repeated heavy joins over large tables, where the per-scan cost accumulates and latency depends on file layout.

Dedicated SQL pools are billed by resident compute and shine when many users run similar queries against conformed models. You pay whether or not anyone queries, which inverts the economics: at steady high utilisation dedicated is far cheaper per unit of work, and at sparse utilisation it is far more expensive.

-- Cost and performance evidence before committing to a pool
SELECT
    table_name,
    SUM(row_count)          AS rows,
    SUM(size) / 1024 / 1024 AS size_gb,
    CAST(used_percent AS int) AS pct_used
FROM sys.dm_db_persisted_columnstore_stats
GROUP BY table_name, used_percent
ORDER BY size_gb DESC;

-- What is actually being scanned on the serverless endpoint
SELECT TOP 20
    request_id,
    total_elapsed_ms,
    bytes_scanned,
    ROUND(bytes_scanned / 1024.0 / 1024.0 / 1024.0, 3) AS gb_scanned,
    left(query, 200) AS query_preview
FROM sys.dm_exec_query_stats
ORDER BY bytes_scanned DESC;

Run the second query on the serverless endpoint for a week. The distribution of bytes scanned tells you whether promotion to a materialised model would pay for itself, and it names the specific queries doing the damage instead of arguing in the abstract.

The cost traps in a serverless estate

The first trap is scanning the whole raw zone with a wildcard because it is convenient. Every reader pays for every file the query touches, so unfiltered scans over an unbounded path become the largest line item in the estate. Fix it with partition filters in the base views rather than relying on each analyst to remember.

The second trap is small files. Ten thousand files of five megabytes each impose per-file overhead on every query, inflating both latency and billed scan. Compaction in the raw zone, or partitioning more aggressively at ingest, reduces this more than any query rewrite.

The third trap is reading from the archive tier. Archive data is cheap to store and expensive to retrieve, with latency measured in minutes. Anything queried regularly belongs in hot or cool, and lifecycle rules should enforce that boundary automatically rather than by memory.

Governance and freshness in an ELT estate

Because raw data is served directly before transformation, the raw zone is exposed to more people than in a classic ETL design. That raises the importance of classification and access control at the file level: a view over raw personal data is personal data handling, not a harmless staging step.

Freshness also needs explicit signalling. In ELT there is no single pipeline completion event that means "everything is up to date", because models build independently. A freshness marker per model, written at the end of a successful build and surfaced in the catalogue, is what lets a dashboard show trust rather than assume it.

Common Mistakes

Leaving OPENROWSET views without partition filters

Fix: Bake a date or partition predicate into the base view so every consumer benefits from file pruning

Re-running CTAS to refresh a curated table

Fix: Use MERGE or an insert into an existing structure so refresh is idempotent and does not orphan previous tables

Choosing dedicated SQL because it feels more production-grade

Fix: Measure bytes scanned and query frequency first; dedicated only wins under sustained high utilisation

Serving personal data straight from raw without classification

Fix: Classify at landing, restrict the raw zone to the identities that need it, and expose curated views for everyone else

Best Practices

  • Keep base views over raw files under source control with explicit schemas
  • Promote a model only when measured scan cost justifies the materialisation
  • Write a freshness marker per model so consumers can verify recency
  • Compact small files in the raw zone on a schedule to cut per-query overhead

Interview Questions

Q1: What advantage does ELT give over ETL when the requirements are still changing?

Raw data becomes queryable in minutes without a transformation pipeline, so requirements can be discovered against real data instead of guessed in advance.

Q2: How does serverless SQL query files that were never loaded into a table?

Through external views using OPENROWSET over the ADLS path with an explicit format and schema, with partition and row-set statistics pushing file selection down to storage.

Q3: When does a dedicated SQL pool become cheaper than serverless?

Under sustained high utilisation by many users running similar queries over conformed models. At sparse utilisation the resident compute cost dominates and serverless wins.

Q4: Why can small files make a serverless estate expensive?

Every query pays per-file open and metadata overhead, so thousands of tiny files inflate both latency and the bytes attributed to the scan.

Q5: How do you signal freshness when there is no single pipeline completion event?

Write a per-model freshness marker at the end of a successful build and surface it in the catalogue, since models are promoted independently in an ELT estate.

Key Takeaways

  • Load first so transformation decisions are made against observed data
  • Base views over raw files are contracts and should be versioned with partition filters
  • Promotion is a measured step, justified by scan cost rather than by convention
  • Serverless bills per scan while dedicated bills for residency, so the crossover depends on utilisation
  • Raw exposure and freshness markers are the two governance problems ELT introduces
🔒

Premium Content

ELT Patterns: ADLS → Synapse Serverless → Dedicated

You've previewed the first section. Unlock this full lesson and 900+ advanced tutorials with a Premium plan.

🎯End-to-end Projects
💼Interview Prep
📜Certificates
🤝Community Access

Already a member? Log in

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-12

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Advertisement