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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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
Resolver II
Resolver II

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
Resolver II
Resolver II

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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.