Sub topic 8
OneLake and Delta tables as the foundation for Direct Lake
This chapter assumes you know what a semantic model and a storage mode are, and that you can read a star schema and write basic DAX. You also need a rough idea of Fabric workspaces. By the end you should know what a Direct Lake model reads from disk, and how the layout of those files affects report performance.
Why Direct Lake starts with storage
Import mode copies data into the model. DirectQuery leaves data at the source and asks it questions. Direct Lake does neither. The engine reads files that are already stored in a form it can use, and it loads the columns it needs into memory.
Those files are Delta tables in OneLake. If the Delta tables are well built, Direct Lake feels like Import. If they are badly built, it loads slowly and may fall back to DirectQuery. Many Direct Lake problems are really data engineering problems in the lake.
OneLake
OneLake is the storage layer of Microsoft Fabric. Each Fabric tenant has one OneLake, and you don't provision it separately. It is built on Azure Data Lake Storage Gen2, so it supports the same folder-style paths and APIs.
Data in OneLake is organized by workspace and item:
- A workspace is the top-level container. It acts like a storage container.
- An item is a lakehouse, a warehouse, or another Fabric artifact inside that workspace.
- A lakehouse has a
Tablesarea for managed Delta tables and aFilesarea for any other files.
A table path looks like this:
abfss://<workspace>@onelake.dfs.fabric.microsoft.com/<lakehouse>.Lakehouse/Tables/<table>Several Fabric engines read the same files in place: Spark, the SQL analytics endpoint, Dataflows, and Power BI. This is why Direct Lake has no copy step. The data a Spark job writes is the same data the semantic model reads.
Shortcuts
A shortcut is a pointer in OneLake to data stored elsewhere. The target can be another lakehouse, Azure Data Lake Storage Gen2, or Amazon S3. A shortcut under Tables that points to a Delta table appears as a table in the lakehouse. A Direct Lake model can use it without a physical copy. Reads still go to the original location, so its permissions and performance still apply.
Delta tables
Delta Lake is an open table format. A Delta table is a folder that holds two things:
| Part | What it is | Why Direct Lake cares |
|---|---|---|
| Parquet data files | Columnar files that hold the rows | The engine reads columns from these files into memory |
| `_delta_log` folder | JSON commit files and periodic checkpoints that record every change | Defines which Parquet files make up the current table version |
Parquet is columnar, as VertiPaq is. Each file is split into row groups, and each row group stores each column separately, already encoded and compressed. This is why Direct Lake can read a single column without scanning the others.
The transaction log is what makes the table reliable. A writer adds new Parquet files and then commits a log entry that lists them. Readers see either the old version or the new one, never a half-written state. Updates and deletes don't edit files in place. They write new files and mark old ones as removed in the log. Old files stay on disk until a cleanup job removes them.
Writing a Delta table
The following code runs in a Fabric notebook attached to a lakehouse. It creates a small managed Delta table and then inspects its log.
from datetime import date
from decimal import Decimal
rows = [
(1, date(2026, 1, 5), 3, Decimal("19.99")),
(2, date(2026, 1, 6), 1, Decimal("49.00")),
(3, date(2026, 2, 1), 5, Decimal("9.50")),
]
schema = "OrderId int, OrderDate date, Quantity int, UnitPrice decimal(10,2)"
df = spark.createDataFrame(rows, schema)
df.write.mode("overwrite").format("delta").saveAsTable("sales")
spark.sql("DESCRIBE HISTORY sales").select("version", "timestamp", "operation").show(truncate=False)
spark.sql("DESCRIBE DETAIL sales").select("numFiles", "sizeInBytes").show()saveAsTable registers the table in the lakehouse, so it appears under Tables and can be added to a semantic model. DESCRIBE HISTORY lists each commit in the log. DESCRIBE DETAIL reports the number of Parquet files, which matters in the next section.
The Sales table here has the same shape as the table used by the Total Sales measure from earlier chapters. That measure would run unchanged against it, because DAX does not depend on where the VertiPaq data came from.
File layout affects Direct Lake speed
Direct Lake reads Parquet files directly, so how they are laid out matters more than it does for Import. Three properties are worth checking.
File and row group size
Every write adds files. Many small writes, such as streaming micro-batches or frequent small appends, produce many tiny files. The engine must open each one, and a table with thousands of small files loads slowly. Fewer, larger files with reasonably large row groups load faster. Compaction rewrites small files into larger ones:
OPTIMIZE salesV-Order
V-Order is a Fabric write-time optimization that sorts and encodes Parquet data so that VertiPaq-style engines read it efficiently. It usually gives better compression and faster loading, at the cost of somewhat slower writes. Whether Spark applies it by default depends on the runtime and workspace settings, so check your environment. You can apply it while compacting:
OPTIMIZE sales VORDERColumn types and cardinality
VertiPaq compresses best on columns with few distinct values. A high-cardinality column, such as a GUID or a full timestamp, takes more memory when loaded. You can reduce this in the lake with the same tactics as in Import mode: drop columns reports don't use, split a datetime into a date and a time, and use integers for keys.
Limits to know about
- Only Delta tables work. Plain CSV, JSON, or Parquet files in the
Filesarea cannot be used as Direct Lake tables until you convert them to a Delta table. - Views are a special case. A SQL view is not a Delta table, so a model that reads through the SQL analytics endpoint falls back to DirectQuery for any view. Prefer materialized Delta tables for anything a report reads often.
- There are no calculated columns or calculated tables that depend on Direct Lake data in the usual Import sense. Compute those values upstream and store them in the Delta table.
- Security in the lake and security in the model are separate layers. The next chapters cover how they interact.
Stale files and housekeeping
Because old files stay on disk after updates, tables grow over time. VACUUM deletes files that no longer belong to any recent version and are older than a retention period. Two practical points:
- Don't shorten the retention period below the default without a reason. A reader or time-travel query that still needs an older version will fail if its files are gone.
- Run
OPTIMIZEafter bulk loads andVACUUMon a schedule, ideally from the same pipeline that loads the data.
What the model does with the table
When a Direct Lake model uses a table, it reads the log to learn the current version and its file list. It then loads only the columns that queries ask for, as they are needed. When the log shows a new version, the model can move to it. The next chapters explain this process, which is called framing, and the fallback to DirectQuery.
For now the point is that Delta table design is part of model design. A clean star schema, compacted files, few columns of low cardinality, and V-Order applied are the lake-side work that makes Direct Lake fast.
Exercise
A Direct Lake report was fast at first but has become slow to load after months of a pipeline that appends a few hundred rows every five minutes. DESCRIBE DETAIL shows thousands of files in the table. What is the likely cause, and what do you do?
Show answer
The frequent small appends created thousands of tiny Parquet files. The engine must open each file when it loads a column, so loading slows down. Compact the table with OPTIMIZE (optionally with VORDER), and schedule compaction after loads. Consider batching writes so fewer small files are produced, and run VACUUM to remove the old files after compaction.
Exercise
A colleague puts a folder of CSV files in the Files area of a lakehouse and asks you to add it to a Direct Lake model. What must happen first?
Show answer
Direct Lake reads only Delta tables. The CSV data must first be loaded into a Delta table, for example with a Spark notebook or a pipeline that writes it under Tables, and the model then uses that table.