Forum Discussion
Onelake Direct Lake Semantic Model plus Views
Dears,
I have in gold layer a lakehouse and a data warehouse , both have sql views (knowing that on LH, its via the SQLendpoint) and I also have a collection of tables in each of this items
I know that if I create a semantic model using : Onelake Direct Lake and add the tables, the semantic model will behave as : Onelake Direct Lake
But what babout if I add as well the views? from lakehouse and DWH?
For the reports and users which will use the views, will the semantic model behave as : Onelake Direct Lake or will it use : DirectQuery ?
Will it work in mix mode, like when tables then : Onelake Direct Lake and when views , then DirectQuery ?
How does it work exactly?
Thanks a lot,
pedro
Hi fabricpribeiro,
DirectLake will use a mixed approach, the native tables will continue to use DirectLake, and the views will fall back to DirectQuery against the SQL Endpoint.
You'll be able to see which items are falling back to DIrectQuery as they will have a little red triangle on them in the model edit page.
4 Replies
- suparnababu8Super User
Hello fabricpribeiro
Yes, you are correct.
if you're using tbales from lakehouse or warehopuse into a sematic model using one leke direct lake the semantic model sues direct lake method. It emans that data is cached in-memeory for fast performance.
if you are using views from lakehouse sql analytics end point or warehouse sql views , the semnatic model can not materialiize them into directlake storage. Views are basically SQL queries defined at the source and they muast be executed at query time. So, views alwasy run on direct query mode.
so, finally as per your sceanrio, if you use both tables and views into your sematic model it would act as mixed mode. reports would hit behave like direct lake perofmrance and reports would hit views will trigger live quuries, so performance depends on sql endpoint or warehouse.
Hope you are clear.
Thank you!!
Did I answer your question? Mark my post as a solution!
Proud to be a Super User! - cengizhanarslanSuper User
Views cannot be framed by Direct Lake since they are SQL virtual objects resolved at query time, not Delta tables in OneLake, so adding any view to a Direct Lake semantic model triggers a fallback to DirectQuery mode. The fallback is not isolated to queries hitting the view — the entire semantic model switches to DirectQuery for all tables, meaning your Delta tables also lose their Direct Lake performance advantage. The correct approach is to materialize your views as Delta tables via a Fabric Notebook or Warehouse procedure on a schedule, so the semantic model reads only Delta objects and stays in true Direct Lake mode throughout.
- fabricpribeiroPost Patron
Thank you both, there are some different opinions here in this two replies . One reply mentions a mixed approach, the other mentioned that all the model will recevert to direct query
Which one is correct?
Also, what about its materialized views? is it the same behavior (fall back into direct query)?
Thank you so much, Pedro
- tayloramySuper User
Hi fabricpribeiro,
DirectLake will use a mixed approach, the native tables will continue to use DirectLake, and the views will fall back to DirectQuery against the SQL Endpoint.
You'll be able to see which items are falling back to DIrectQuery as they will have a little red triangle on them in the model edit page.