Sub topic 9
Direct Lake mode: loading Delta columns into memory without a copy step
This chapter assumes you know Import and DirectQuery from the earlier chapters, and that you know what VertiPaq, OneLake, and Delta tables are. You should also know what a Fabric workspace is. Direct Lake needs a Fabric capacity.
The idea
Import mode copies source data into the semantic model during a refresh. DirectQuery copies nothing and sends a query to the source for every visual. Direct Lake sits between them. The data stays in Delta tables in OneLake, and the engine loads columns from those files into VertiPaq memory when a query needs them.
Delta tables store their data as Parquet files. Parquet is a columnar format, which is close to how VertiPaq organizes data. Because of this, the engine can read the files directly and convert them into its in-memory structures. This conversion is sometimes called transcoding. No import job and no second copy of the data in the model are needed.
What happens at query time
- A visual sends a DAX query to the semantic model.
- The engine works out which columns the query touches.
- Columns already in memory are used as they are. Missing columns are read from the Delta table's Parquet files and loaded.
- VertiPaq runs the query in memory.
The first query that touches a column pays the load cost. Later queries on that column run at Import-like speed. Only the columns a query needs are loaded, not whole tables. A wide table with many unused columns costs little memory.
What "refresh" means here
A Direct Lake refresh does not copy data. It performs framing, which updates the model's pointer to the current version of each Delta table. This takes seconds, because only metadata changes. After framing, the model sees new data. The next chapter covers framing in detail, along with fallback to DirectQuery.
Using the same measures
Measures in Direct Lake run in VertiPaq, as in Import mode. A measure like this one needs no changes:
Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[UnitPrice] )Calculated columns and calculated tables cannot be built from Direct Lake tables. Do that work upstream, in the pipeline or notebook that writes the Delta table.
Strengths and costs
| Aspect | Direct Lake behavior |
|---|---|
| Freshness | Updates after framing, with no data copy |
| Query speed | Import-like once columns are loaded; slower on first access |
| Source load | The source database is not queried by reports |
| Memory | Only columns that were queried are held |
| Modeling | Prepare data upstream; no calculated columns |
Exercise
A report's first visual after a Delta table update takes several seconds, but later visuals using the same columns are fast. What explains this, and what does the refresh do?
Show answer
The first query loads the needed columns from Parquet files in OneLake into VertiPaq memory. Later queries reuse the in-memory columns. The refresh only reframes the model to the latest Delta table version and copies no data.