Sub topic 10
Framing, column loading, and fallback to DirectQuery
This chapter assumes you know what a Direct Lake semantic model is, that its tables read Delta tables from OneLake, and that you can read a basic DAX query. It covers three behaviors that decide how a Direct Lake model feels in practice.
Framing: refresh without copying
Import refresh copies data into the model. Direct Lake refresh does not. It performs framing, which updates the model's metadata so it points at the current version of each Delta table, meaning the set of Parquet files that make up the table now. No rows are read during framing, so it usually takes seconds regardless of table size.
Data you query after framing comes from the new files. Data already in memory from older files is discarded, because it no longer matches the frame.
You can trigger framing in three ways:
- Turn on automatic updates in the model settings. The model reframes when the Delta tables change.
- Run a model refresh, manually or on a schedule.
- Call the refresh from a pipeline step after your load finishes.
Automatic updates can reframe in the middle of a multi-table load. Reports may then briefly see one table updated and another not. If you need consistent snapshots, turn automatic updates off and refresh from the pipeline once all loads are done.
Column loading: memory on demand
Direct Lake does not load whole tables. When a query first touches a column, the engine reads that column from Parquet and converts it into VertiPaq's compressed format. This conversion is called transcoding. The column then stays in memory for later queries.
- A cold query needs columns that are not loaded yet. It is slower.
- A warm query finds its columns already in memory. It runs at Import-like speed.
- Columns can be evicted under memory pressure, and framing invalidates columns whose files changed.
So the first visual after a refresh is often the slowest. Only columns that reports actually use consume memory.
Fallback to DirectQuery
For models built on a Fabric SQL endpoint, a query that Direct Lake cannot serve from memory can fall back to DirectQuery. The engine sends SQL to the endpoint instead. The query still returns results, but it behaves like DirectQuery: slower, and it puts load on the source.
Common causes:
- The table is a SQL view, not a Delta table.
- Row-level security is defined on the SQL endpoint.
- The data exceeds the capacity's guardrails, such as the maximum number of files, row groups, or rows per table. These limits depend on the capacity size.
Direct Lake on OneLake does not fall back. A query that cannot be served fails with an error.
The model's DirectLakeBehavior property controls what happens:
| Value | Behavior |
|---|---|
| Automatic | Try Direct Lake, fall back to DirectQuery if needed |
| DirectLakeOnly | Never fall back; the query returns an error |
| DirectQueryOnly | Always use DirectQuery, useful for testing |
Checking for fallback
Run the same query under Performance Analyzer or DAX Studio, and look for a DirectQuery event or SQL text in the trace:
EVALUATE
SUMMARIZECOLUMNS (
'Date'[Year],
"Total Sales", [Total Sales]
)
ORDER BY 'Date'[Year]Run it twice. If the second run is much faster, you saw column loading. If it is slow both times and SQL appears, you hit fallback.
Exercise
A Direct Lake report is fast all day, but the first visual after each nightly load takes 20 seconds. No SQL queries appear in the trace. What is the likely cause, and how could you reduce it?
Show answer
Framing at the end of the load invalidated the in-memory columns, so the first queries must transcode the columns they need again (a cold query). It is not fallback, since no SQL appears. To reduce it, run a few representative queries right after the refresh to warm the columns, and reduce the number of columns that visuals use.