Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
PJ-Fairday
Frequent Visitor

Sempy Link Labs: Add a new table to a semantic model from a Fabric Warehouse delta table source

Hey folks,

 

Sempy link labs has been a life saver for numerous semantic model tasks. However I'm stuck on this one. My gold layer is in Fabric Warehouse and the semantic model is in direct lake mode. I use sempy to automate admin and build work. However I'm finding that there is one simple thing that I cannot do which is to add a new semantic model based on a Fabric warehouse source.

I'm looking for a warehouse-compatible version of 

sempy_labs.directlake.add_table_to_direct_lake_semantic_model

When I run the below... 

from sempy_labs import directlake as dl
dl.add_table_to_direct_lake_semantic_model(dataset=dataset, table_name='New Date', lakehouse_table_name='dim_date', workspace=workspace)

I get an error that dim_date is not a lakehouse table:

ValueError: 🔴 This function is only valid for Direct Lake semantic models which source from Fabric lakehouses (not warehouses).

Adding a table to a semantic model is quite a basic function. I'm hoping that there is a way to do this programatically
Thanks!

1 ACCEPTED SOLUTION
ssrithar
Responsive Resident
Responsive Resident

Hi @PJ-Fairday ,

 

The add_table_to_direct_lake_semantic_model function is specifically designed for lakehouse-sourced Direct Lake models and does not currently support warehouse-sourced models.If needed you can add a goldproject layer of lakehouse and that is how we have it so we can have the direct lake sematic model and have sempy automation.

 

If this post helps, then please appreciate giving a Kudos or accepting as a Solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

 

 

View solution in original post

2 REPLIES 2
PJ-Fairday
Frequent Visitor

Thanks I've written code to do this will submit it to the semantic-link-labs repo so hopefully will be available in a future version!

ssrithar
Responsive Resident
Responsive Resident

Hi @PJ-Fairday ,

 

The add_table_to_direct_lake_semantic_model function is specifically designed for lakehouse-sourced Direct Lake models and does not currently support warehouse-sourced models.If needed you can add a goldproject layer of lakehouse and that is how we have it so we can have the direct lake sematic model and have sempy automation.

 

If this post helps, then please appreciate giving a Kudos or accepting as a Solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.