Sub topic 8
OneLake and Delta Tables as the Foundation for Direct Lake
Direct Lake only works because of how Microsoft Fabric stores data. This chapter covers the two pieces underneath it, OneLake and Delta tables, so the next chapter on Direct Lake makes sense.
This chapter assumes you know what a Fabric workspace is, can read a star schema, and understand how Import mode loads data into VertiPaq (the in-memory columnar engine).
OneLake: one storage layer for a tenant
OneLake is the single data lake that every Fabric tenant gets. You don't provision it. Every workspace stores its items in it, and every Fabric engine reads from it.
- A lakehouse or warehouse keeps its tables as files in OneLake.
- Spark, the SQL analytics endpoint, and Power BI all read the same files.
- Data is not copied between engines. One copy serves them all.
This is the key difference from Import mode. An Import model holds a private copy of the data inside the semantic model. A Direct Lake model points at files that already exist in OneLake.
Delta tables: Parquet files plus a transaction log
A Delta table is a folder in OneLake with two parts:
- Data files in Parquet format. Parquet is a columnar file format, so each column is stored and compressed separately.
- A
_delta_logfolder. It holds a transaction log in JSON files that records every change to the table.
Each write (an insert, update, delete, or merge) adds new Parquet files and appends a log entry. The log defines which files make up the current version of the table. Readers use the log to see a consistent snapshot. A writer in the middle of a job does not expose half-finished data.
Tables/
FactSales/
_delta_log/
00000000000000000000.json
00000000000000000001.json
part-00000-a1.snappy.parquet
part-00001-b2.snappy.parquetEach numbered log file is one table version. A reader opens the latest versions of the log, lists the active Parquet files, and reads only those.
Why this suits VertiPaq
Parquet is columnar, and VertiPaq is columnar. Both compress repeated values and read only the columns a query needs. Direct Lake exploits this match. It can load Parquet column data into memory in a form VertiPaq can use, without a conversion step like the one an Import refresh performs.
The Delta log also gives Power BI a cheap way to check freshness. The model records which table version it last read. Comparing that to the current log version tells it whether anything changed.
The diagram below shows the flow.
Requirements for Direct Lake sources
Direct Lake needs the data to be a Delta table in a Fabric lakehouse or warehouse. Several practical points follow from that:
- Plain CSV or JSON files must first be loaded into a Delta table.
- Table design affects speed. Many tiny Parquet files slow reads, so compact them with a maintenance command such as
OPTIMIZE. - Views in the SQL analytics endpoint are not Delta tables. A model that uses them falls back to DirectQuery.
Common errors
- Assuming OneLake means "always fresh." The model reads the Delta version that is current at its last framing. Framing is covered in the next chapter.
- Pointing a model at a view and expecting Direct Lake behavior.
- Skipping table maintenance after many small incremental loads.
Exercise
A Delta table folder contains Parquet files and a deltalog folder. What does the log let a reader do that the Parquet files alone would not?
Show answer
The log records which Parquet files belong to each table version. A reader uses it to get a consistent snapshot of the current table and to detect that the table has changed, instead of guessing from whatever files are in the folder.